Skip to content

Commit

Permalink
Test updates for new --verbose default
Browse files Browse the repository at this point in the history
  • Loading branch information
timj committed Jun 16, 2023
1 parent e5b6c5d commit a762cbe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_cliCmdQueryDatasetTypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def command():

def test_minimal(self):
"""Test only required parameters."""
self.run_test(["query-dataset-types", "here"], self.makeExpected(repo="here"))
self.run_test(["query-dataset-types", "here"], self.makeExpected(repo="here", verbose=True))

def test_requiredMissing(self):
"""Test that if the required parameter is missing it fails"""
Expand Down Expand Up @@ -113,11 +113,11 @@ def testQueryDatasetTypes(self):
)
self.assertNotEqual(result.exit_code, 0, clickResultMsg(result))
# check not-verbose output:
result = runner.invoke(cli, ["query-dataset-types", "here"])
result = runner.invoke(cli, ["query-dataset-types", "here", "--no-verbose"])
self.assertEqual(result.exit_code, 0, clickResultMsg(result))
self.assertAstropyTablesEqual(readTable(result.output), expectedNotVerbose)
# check glob output:
result = runner.invoke(cli, ["query-dataset-types", "here", "t*"])
result = runner.invoke(cli, ["query-dataset-types", "here", "--no-verbose", "t*"])
self.assertEqual(result.exit_code, 0, clickResultMsg(result))
self.assertAstropyTablesEqual(readTable(result.output), expectedNotVerbose)
# check verbose output:
Expand Down Expand Up @@ -234,7 +234,7 @@ def testRemoveDatasetTypes(self):
self.assertDatasetTypes(runner, "*", ("placeholder",))

def assertDatasetTypes(self, runner: LogCliRunner, query: str, expected: tuple[str, ...]) -> None:
result = runner.invoke(cli, ["query-dataset-types", "here", query])
result = runner.invoke(cli, ["query-dataset-types", "here", "--no-verbose", query])
self.assertEqual(result.exit_code, 0, clickResultMsg(result))
expected = AstropyTable(
(expected,),
Expand Down

0 comments on commit a762cbe

Please sign in to comment.