Skip to content

Commit bada1fa

Browse files
committed
adds ToolCommand cls to remove, fetch, list & kills roundtrip test
1 parent 026acdb commit bada1fa

File tree

2 files changed

+6
-33
lines changed

2 files changed

+6
-33
lines changed

q2cli/builtin/tools.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,7 +1441,8 @@ def annotation_create(input_path, annotation_type,
14411441
name='annotation-remove',
14421442
short_help='Remove an Annotation from a QIIME 2 Result.',
14431443
help='Remove an existing Annotation (by name) from'
1444-
' an Artifact or Visualization.'
1444+
' an Artifact or Visualization.',
1445+
cls=ToolCommand
14451446
)
14461447
@click.option(
14471448
'--input-path',
@@ -1487,7 +1488,8 @@ def annotation_remove(input_path, name, output_path):
14871488
name='annotation-fetch',
14881489
short_help='Fetch an Annotation from a QIIME 2 Result.',
14891490
help='Fetch an existing Annotation (by name) from'
1490-
' an Artifact or Visualization.'
1491+
' an Artifact or Visualization.',
1492+
cls=ToolCommand
14911493
)
14921494
@click.option(
14931495
'--input-path',
@@ -1536,7 +1538,8 @@ def annotation_fetch(input_path, name, verbose):
15361538
name='annotation-list',
15371539
short_help='List Annotations on a QIIME 2 Result.',
15381540
help='List all Annotations that are attached to'
1539-
' an Artifact or Visualization.'
1541+
' an Artifact or Visualization.',
1542+
cls=ToolCommand
15401543
)
15411544
@click.option(
15421545
'--input-path',

q2cli/tests/test_tools.py

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,36 +1308,6 @@ def setUp(self):
13081308
def tearDown(self):
13091309
shutil.rmtree(self.tempdir)
13101310

1311-
def test_annotation_commands_roundtrip_success(self):
1312-
create_result = self.runner.invoke(
1313-
tools,
1314-
['annotation-create', '--input-path', self.art1,
1315-
'--annotation-type', 'Note',
1316-
'--name', 'mynote', '--text', 'my special text',
1317-
'--output-path', self.output1]
1318-
)
1319-
self.assertEqual(create_result.exit_code, 0)
1320-
1321-
fetch_result = self.runner.invoke(
1322-
tools,
1323-
['annotation-fetch', '--input-path', self.output1,
1324-
'--name', 'mynote']
1325-
)
1326-
self.assertEqual(fetch_result.exit_code, 0)
1327-
1328-
list_result = self.runner.invoke(
1329-
tools,
1330-
['annotation-list', '--input-path', self.output1]
1331-
)
1332-
self.assertEqual(list_result.exit_code, 0)
1333-
1334-
remove_result = self.runner.invoke(
1335-
tools,
1336-
['annotation-remove', '--input-path', self.output1,
1337-
'--name', 'mynote', '--output-path', self.output1]
1338-
)
1339-
self.assertEqual(remove_result.exit_code, 0)
1340-
13411311
# ANNOTATION_CREATE
13421312
def test_annotation_create_with_text_success(self):
13431313
create_result = self.runner.invoke(

0 commit comments

Comments
 (0)