Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
forman committed Jan 31, 2018
1 parent 4509220 commit cdc144b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
17 changes: 10 additions & 7 deletions tests/ui/test_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@


class L1bComparatorTest(TestCase):
def test_it(self):
# Ok, not really a test yet, but at least we import L1bComparator
with self.assertRaises(ValueError) as e:
compare_l1b_products(None, 'y', False)
self.assertEquals(str(e.exception), 'output_path must be given')
# Ok, not really a test yet, but at least we import L1bInspector

def test_without_files(self):
with self.assertRaises(ValueError) as e:
compare_l1b_products('x', '', False)
self.assertEquals(str(e.exception), 'output_path must be given')
compare_l1b_products(None, None)
self.assertEquals(str(e.exception), 'file_path_1 must be given')

def test_with_files(self):
compare_l1b_products("test_data/data/test_l1b/temp/output.nc",
"test_data/data/test_l1b/temp/output.nc")

12 changes: 8 additions & 4 deletions tests/ui/test_inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@


class L1bProductInspectorTest(TestCase):
def test_it(self):
# Ok, not really a test yet, but at least we import L1bInspector
# Ok, not really a test yet, but at least we import L1bInspector

def test_without_file(self):
with self.assertRaises(ValueError) as e:
inspect_l1b_product(None, False)
self.assertEquals(str(e.exception), 'output_path must be given')
inspect_l1b_product(None)
self.assertEquals(str(e.exception), 'product_file_path must be given')

def test_with_file(self):
inspect_l1b_product("test_data/data/test_l1b/temp/output.nc")

0 comments on commit cdc144b

Please sign in to comment.