File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,10 @@ def pytest_configure(config):
112
112
from .nbdime_reporter import NbdimeReporter
113
113
reporter = NbdimeReporter (config , sys .stdout )
114
114
config .pluginmanager .register (reporter , 'nbdimereporter' )
115
+ if config .option .nbval or config .option .nbval_lax :
116
+ if config .option .kernel_name and config .option .current_env :
117
+ raise ValueError ("--current-env and --kernel-name are mutually exclusive." )
118
+
115
119
116
120
117
121
def pytest_collect_file (path , parent ):
@@ -232,8 +236,8 @@ def setup(self):
232
236
Called by pytest to setup the collector cells in .
233
237
Here we start a kernel and setup the sanitize patterns.
234
238
"""
235
- if self . parent . config . option . kernel_name and self . parent . config . option . current_env :
236
- raise ValueError ( "--current-env and --kernel-name are mutually exclusive." )
239
+ # we've already checked that --current-env and --kernel-name
240
+ # were not both supplied
237
241
if self .parent .config .option .current_env :
238
242
kernel_name = CURRENT_ENV_KERNEL_NAME
239
243
elif self .parent .config .option .kernel_name :
You can’t perform that action at this time.
0 commit comments