@@ -89,9 +89,9 @@ def pytest_addoption(parser):
89
89
'the same environment that py.test was '
90
90
'launched from. Without this flag, the kernel stored '
91
91
'in the notebook is used by default. '
92
- 'See also: --kernel-name' )
92
+ 'See also: --nbval- kernel-name' )
93
93
94
- group .addoption ('--kernel-name' , action = 'store' , default = None ,
94
+ group .addoption ('--nbval- kernel-name' , action = 'store' , default = None ,
95
95
help = 'Force test execution to use the named kernel. '
96
96
'If a kernel is not named, the kernel stored in the '
97
97
'notebook is used by default. '
@@ -113,8 +113,8 @@ def pytest_configure(config):
113
113
reporter = NbdimeReporter (config , sys .stdout )
114
114
config .pluginmanager .register (reporter , 'nbdimereporter' )
115
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." )
116
+ if config .option .nbval_kernel_name and config .option .current_env :
117
+ raise ValueError ("--current-env and --nbval- kernel-name are mutually exclusive." )
118
118
119
119
120
120
@@ -236,12 +236,12 @@ def setup(self):
236
236
Called by pytest to setup the collector cells in .
237
237
Here we start a kernel and setup the sanitize patterns.
238
238
"""
239
- # we've already checked that --current-env and --kernel-name
240
- # were not both supplied
239
+ # we've already checked that --current-env and
240
+ # --nbval-kernel-name were not both supplied
241
241
if self .parent .config .option .current_env :
242
242
kernel_name = CURRENT_ENV_KERNEL_NAME
243
- elif self .parent .config .option .kernel_name :
244
- kernel_name = self .parent .config .option .kernel_name
243
+ elif self .parent .config .option .nbval_kernel_name :
244
+ kernel_name = self .parent .config .option .nbval_kernel_name
245
245
else :
246
246
kernel_name = self .nb .metadata .get (
247
247
'kernelspec' , {}).get ('name' , 'python' )
0 commit comments