From a338f58329a229a8c6dd4466740117417d263d57 Mon Sep 17 00:00:00 2001 From: John Miller Date: Fri, 29 Nov 2019 20:19:20 -0700 Subject: [PATCH] Add some regression tests for pytools. --- features/pytools.feature | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 features/pytools.feature diff --git a/features/pytools.feature b/features/pytools.feature new file mode 100644 index 0000000..f27328a --- /dev/null +++ b/features/pytools.feature @@ -0,0 +1,31 @@ +@pytools +Scenario: Check that pytools are being loaded. + Given new python notebook + And I type "__ein_pytools_version" + And I press "M-RET" + And I wait for the smoke to clear + Then I should see "1.0.0" + +@pytools @matplotlib +Scenario: Setting matplotlib figure size. + Given new python notebook + And I type "import matplotlib.pyplot as plt" + And I press "M-RET" + And I wait for the smoke to clear + And I eval (ein:pytools-set-figure-size 8.0 6.0) + And I type "__ein_rcParams['figure.figsize']" + And I press "M-RET" + And I wait for the smoke to clear + Then I should see "[8.0, 6.0]" + +@pytools @matplotlib +Scenario: Use generic command to set a matplotlib parameter. + Given new python notebook + And I type "import matplotlib.pyplot as plt" + And I press "M-RET" + And I wait for the smoke to clear + And I eval (ein:pytools-set-matplotlib-parameter "figure.dpi" 120) + And I type "__ein_rcParams['figure.dpi']" + And I press "M-RET" + And I wait for the smoke to clear + Then I should see "120"