Skip to content

Commit 2ba6390

Browse files
committed
finish test coverage
1 parent d07699e commit 2ba6390

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

‎paths_cli/commands/wizard.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
'wizard',
66
short_help="run wizard for setting up simulations",
77
)
8-
def wizard():
8+
def wizard(): # no-cov
99
TWO_STATE_TPS_WIZARD.run_wizard()
1010

1111
CLI = wizard

‎paths_cli/tests/wizard/test_wizard.py‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,14 @@ def test_ask(self):
7272
assert 'bar' in console.log_text
7373

7474
def test_ask_help(self):
75-
pass
75+
console = MockConsole(['?helpme', 'foo'])
76+
self.wizard.console = console
77+
def helper(wizard, result):
78+
wizard.say(f"You said: {result[1:]}")
79+
80+
result = self.wizard.ask('bar', helper=helper)
81+
assert result == 'foo'
82+
assert 'You said: helpme' in console.log_text
7683

7784
def _generic_speak_test(self, func_name):
7885
console = MockConsole()

‎paths_cli/wizard/cvs.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
try:
1111
import mdtraj as md
12-
except ImportError:
12+
except ImportError: # no-cov
1313
HAS_MDTRAJ = False
1414
else:
1515
HAS_MDTRAJ = True

0 commit comments

Comments
 (0)