Skip to content

Commit 72669fd

Browse files
committed
fix tests for pausing
1 parent 6fb06fc commit 72669fd

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

paths_cli/tests/wizard/conftest.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@
55

66
from paths_cli.compat.openmm import HAS_OPENMM, mm, unit
77

8+
from paths_cli.wizard import pause
9+
10+
11+
@pytest.fixture(autouse=True, scope='session')
12+
def pause_style_testing():
13+
pause.set_pause_style('testing')
14+
yield
15+
16+
817
# TODO: this isn't wizard-specific, and should be moved somwhere more
918
# generally useful (like, oh, maybe openpathsampling.tests.fixtures?)
1019
@pytest.fixture

paths_cli/tests/wizard/mock_wizard.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ def input(self, content):
3737
self.log.append(content + " " + user_input)
3838
return user_input
3939

40+
def draw_hline(self):
41+
# we don't even bother for the mock console
42+
pass
43+
4044
@property
4145
def log_text(self):
4246
return "\n".join(self.log)

paths_cli/tests/wizard/test_pause.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
from paths_cli.wizard.pause import *
66

7+
@pytest.fixture(autouse=True, scope="module")
8+
def use_default_pause_style():
9+
with pause_style('default'):
10+
yield
11+
712

813
def test_get_pause_style():
914
default_style = PAUSE_STYLES['default']

paths_cli/tests/wizard/test_volumes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
volume_ask
1010
)
1111

12-
1312
import openpathsampling as paths
1413
from openpathsampling.experimental.storage.collective_variables import \
1514
CoordinateFunctionCV
1615

1716
from openpathsampling.tests.test_helpers import make_1d_traj
1817

18+
1919
def _wrap(x, period_min, period_max):
2020
# used in testing periodic CVs
2121
while x >= period_max:

0 commit comments

Comments
 (0)