Skip to content

Commit

Permalink
Be more explicit about the failure message return type
Browse files Browse the repository at this point in the history
  • Loading branch information
timj committed Jul 8, 2022
1 parent 59b54d1 commit fc38b16
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/test_cliCmdQueryDataIds.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ def testDimensions(self):
def testNull(self):
"Test asking for nothing."
res, msg = self._queryDataIds(self.root)
self.assertEqual(res, None, msg)
self.assertFalse(msg)
self.assertIsNone(res, msg)
self.assertEqual(msg, "")

def testWhere(self):
"""Test with a WHERE constraint."""
Expand All @@ -87,7 +87,7 @@ def testWhere(self):
names=("band", "instrument", "physical_filter", "visit"),
)
self.assertAstropyTablesEqual(res, expected)
self.assertFalse(msg)
self.assertIsNone(msg)

def testDatasetsAndCollections(self):
"""Test constraining via datasets and collections."""
Expand All @@ -114,7 +114,7 @@ def testDatasetsAndCollections(self):
names=("band", "instrument", "physical_filter", "visit"),
)
self.assertAstropyTablesEqual(res, expected)
self.assertFalse(msg)
self.assertIsNone(msg)

# Verify the new dataset is found in the "foo" collection.
res, msg = self._queryDataIds(
Expand All @@ -125,7 +125,7 @@ def testDatasetsAndCollections(self):
names=("band", "instrument", "physical_filter", "visit"),
)
self.assertAstropyTablesEqual(res, expected)
self.assertFalse(msg)
self.assertIsNone(msg)

# Verify the new dataset is found in the "foo" collection and the
# dimensions are determined automatically.
Expand All @@ -137,7 +137,7 @@ def testDatasetsAndCollections(self):
names=("band", "instrument", "physical_filter", "visit"),
)
self.assertAstropyTablesEqual(res, expected)
self.assertFalse(msg)
self.assertIsNone(msg)

# Check that we get a reason if no dimensions can be inferred.
new_dataset_type = DatasetType(
Expand Down

0 comments on commit fc38b16

Please sign in to comment.