Skip to content

Commit 9c92b05

Browse files
committed
Only pass absolute config path if config file exists
1 parent ec8fd75 commit 9c92b05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nbval/cover.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def setup_coverage(config, kernel, floc, output_loc=None):
5151
# Get options from pytest-cov's command line arguments:
5252
source = config.option.cov_source
5353
config_file = config.option.cov_config
54-
if config_file and isinstance(config_file, str):
54+
if isinstance(config_file, str) and os.path.isfile(config_file):
5555
config_file = os.path.abspath(config_file)
5656

5757
# Copy the suffix of plugin if available

0 commit comments

Comments
 (0)