We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1e389e0 commit 030c1dbCopy full SHA for 030c1db
1 file changed
testflo/cover.py
@@ -28,12 +28,16 @@ def setup_coverage(options):
28
data_file = os.path.join(cover_dir, '.coverage')
29
cfg_file = os.path.join(cover_dir, '.coveragerc')
30
31
- cov = coverage.Coverage(
32
- config_file=cfg_file,
33
- data_file=data_file,
34
- data_suffix=True,
35
- branch=options.cover_branch,
36
- )
+ kwargs = {
+ 'data_file': data_file,
+ 'data_suffix': True,
+ 'branch': options.cover_branch,
+ }
+
37
+ if os.path.isfile(cfg_file):
38
+ kwargs['config_file'] = cfg_file
39
40
+ cov = coverage.Coverage(**kwargs)
41
42
cov.config.ignore_errors = True
43
0 commit comments