Skip to content

Commit fce0250

Browse files
committed
Rename new option from --kernel-name to --nbval-kernel-name.
1 parent 710deaa commit fce0250

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

nbval/plugin.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ def pytest_addoption(parser):
8989
'the same environment that py.test was '
9090
'launched from. Without this flag, the kernel stored '
9191
'in the notebook is used by default. '
92-
'See also: --kernel-name')
92+
'See also: --nbval-kernel-name')
9393

94-
group.addoption('--kernel-name', action='store', default=None,
94+
group.addoption('--nbval-kernel-name', action='store', default=None,
9595
help='Force test execution to use the named kernel. '
9696
'If a kernel is not named, the kernel stored in the '
9797
'notebook is used by default. '
@@ -113,8 +113,8 @@ def pytest_configure(config):
113113
reporter = NbdimeReporter(config, sys.stdout)
114114
config.pluginmanager.register(reporter, 'nbdimereporter')
115115
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.")
118118

119119

120120

@@ -236,12 +236,12 @@ def setup(self):
236236
Called by pytest to setup the collector cells in .
237237
Here we start a kernel and setup the sanitize patterns.
238238
"""
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
241241
if self.parent.config.option.current_env:
242242
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
245245
else:
246246
kernel_name = self.nb.metadata.get(
247247
'kernelspec', {}).get('name', 'python')

0 commit comments

Comments
 (0)