Skip to content

Commit

Permalink
adding test case for missing md col and file
Browse files Browse the repository at this point in the history
  • Loading branch information
lizgehret committed Jan 17, 2024
1 parent 62bf3b1 commit 23785f8
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion q2cli/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,8 @@ def test_invalid_metadata_merge(self):


class TestMetadataColumnSupport(MetadataTestsBase):
def test_required_missing_file(self):
# Neither md file or column params provided
def test_required_missing_file_and_column(self):
result = self._run_command(
'identity-with-metadata-column', '--i-ints', self.input_artifact,
'--o-out', self.output_artifact)
Expand All @@ -578,6 +579,17 @@ def test_required_missing_file(self):
self.assertTrue(result.output.startswith('Usage:'))
self.assertIn("Missing option '--m-metadata-file'", result.output)

# md file param missing, md column param & value provided
def test_required_missing_file(self):
result = self._run_command(
'identity-with-metadata-column', '--i-ints', self.input_artifact,
'--m-metadata-column', 'a', '--o-out', self.output_artifact)

self.assertEqual(result.exit_code, 1)
self.assertTrue(result.output.startswith('Usage:'))
self.assertIn("Missing option '--m-metadata-file'", result.output)

# md file param & value provided, md column param missing
def test_required_missing_column(self):
result = self._run_command(
'identity-with-metadata-column', '--i-ints', self.input_artifact,
Expand Down

0 comments on commit 23785f8

Please sign in to comment.