Skip to content

Commit

Permalink
TST #224
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Aug 15, 2019
1 parent feb29a7 commit 11cb180
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,17 @@ def tearDown(self):
pass

def test_list_recent_scans(self):
with self.assertRaises(RuntimeWarning):
APS_utils.list_recent_scans(db=self.db, raises=True)

table = APS_utils.list_recent_scans(printing=False, db=self.db)
self.assertIsNotNone(table)

def test_listruns(self):
headers = self.db(plan_name="count")
headers = list(headers)[0:1]
self.assertEqual(len(headers), 1)
table = APS_utils.list_recent_scans(
keys=["exit_status",],
table = APS_utils.listruns(
show_command=True,
printing=False,
num=10,
Expand All @@ -197,14 +203,14 @@ def test_list_recent_scans(self):
self.assertIsNotNone(table)
self.assertEqual(
len(table.labels),
5,
3+2,
"asked for 2 extra columns (total 5)")
self.assertEqual(
len(table.rows),
10,
"asked for 10 rows")
self.assertLessEqual(
len(table.rows[1][3]),
len(table.rows[1][4]),
40,
"command row should be 40 char or less")

Expand Down

0 comments on commit 11cb180

Please sign in to comment.