File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,6 +112,10 @@ def pytest_configure(config):
112112 from .nbdime_reporter import NbdimeReporter
113113 reporter = NbdimeReporter (config , sys .stdout )
114114 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+
115119
116120
117121def pytest_collect_file (path , parent ):
@@ -232,8 +236,8 @@ def setup(self):
232236 Called by pytest to setup the collector cells in .
233237 Here we start a kernel and setup the sanitize patterns.
234238 """
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
237241 if self .parent .config .option .current_env :
238242 kernel_name = CURRENT_ENV_KERNEL_NAME
239243 elif self .parent .config .option .kernel_name :
You can’t perform that action at this time.
0 commit comments