Skip to content

Commit

Permalink
fixes #408
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Nov 23, 2020
1 parent 1e6672d commit c0252ce
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 30 deletions.
19 changes: 0 additions & 19 deletions apstools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
~safe_ophyd_name
~select_live_plot
~select_mpl_figure
~show_ophyd_symbols
~split_quoted_line
~summarize_runs
~text_encode
Expand Down Expand Up @@ -734,24 +733,6 @@ def listobjects(show_pv=True, printing=True, verbose=False, symbols=None):
return table


def show_ophyd_symbols(show_pv=True,
printing=True,
verbose=False,
symbols=None):
"""
DEPRECATED: Use listobjects() instead.
"""
warnings.warn(
"DEPRECATED: show_ophyd_symbols() will be removed"
" in a future release. Use listobjects() instead."
)
listobjects(
show_pv=show_pv,
printing=printing,
verbose=verbose,
symbols=symbols)


def split_quoted_line(line):
"""
splits a line into words some of which might be quoted
Expand Down
12 changes: 1 addition & 11 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def test_listobjects(self):
wont_show = ("flyer1", "flyer2", "new_trivial_flyer", "trivial_flyer")
num = len(sims) - len(wont_show)
kk = sorted(sims.keys())
# sims hardware not found by show_ophyd_symbols() in globals!

table = APS_utils.listobjects(symbols=sims, printing=False)
self.assertEqual(4, len(table.labels))
rr = [r[0] for r in table.rows]
Expand All @@ -203,16 +203,6 @@ def test_listobjects(self):
self.assertTrue(k in rr, msg)
self.assertEqual(num, len(table.rows))

def test_show_ophyd_symbols(self):
sims = ophyd.sim.hw().__dict__
# wont_show = ("flyer1", "flyer2", "new_trivial_flyer", "trivial_flyer")
self.assertWarns(
UserWarning,
APS_utils.show_ophyd_symbols,
symbols=sims,
printing=False # kwargs
)

def test_unix(self):
cmd = 'echo "hello"'
out, err = APS_utils.unix(cmd)
Expand Down

0 comments on commit c0252ce

Please sign in to comment.