@@ -69,7 +69,7 @@ def __init__(self, cov_source, cov_report, cov_config, cov_append, cov_branch, c
69
69
self .data_file = None
70
70
self .node_descs = set ()
71
71
self .failed_workers = []
72
- self .topdir = str (Path .cwd ())
72
+ self .topdir = os . fspath (Path .cwd ())
73
73
self .is_collocated = None
74
74
75
75
@contextlib .contextmanager
@@ -96,12 +96,13 @@ def set_env(self):
96
96
os .environ ['COV_CORE_SOURCE' ] = os .pathsep
97
97
else :
98
98
os .environ ['COV_CORE_SOURCE' ] = os .pathsep .join (self .cov_source )
99
- config_file = Path (self .cov_config ). resolve ()
99
+ config_file = Path (self .cov_config )
100
100
if config_file .exists ():
101
- os .environ ['COV_CORE_CONFIG' ] = str (config_file )
101
+ os .environ ['COV_CORE_CONFIG' ] = os . fspath (config_file . resolve () )
102
102
else :
103
103
os .environ ['COV_CORE_CONFIG' ] = os .pathsep
104
- os .environ ['COV_CORE_DATAFILE' ] = str (Path (self .cov .config .data_file ).resolve ())
104
+ # this still uses the old abspath cause apparently Python 3.9 on Windows has a buggy Path.resolve()
105
+ os .environ ['COV_CORE_DATAFILE' ] = os .path .abspath (self .cov .config .data_file ) # noqa: PTH100
105
106
if self .cov_branch :
106
107
os .environ ['COV_CORE_BRANCH' ] = 'enabled'
107
108
@@ -236,7 +237,7 @@ def start(self):
236
237
source = self .cov_source ,
237
238
branch = self .cov_branch ,
238
239
data_suffix = True ,
239
- data_file = str ( Path ( self .cov .config .data_file ). resolve ()),
240
+ data_file = os . path . abspath ( self .cov .config .data_file ), # noqa: PTH100
240
241
config_file = self .cov_config ,
241
242
)
242
243
@@ -283,7 +284,7 @@ def start(self):
283
284
source = self .cov_source ,
284
285
branch = self .cov_branch ,
285
286
data_suffix = True ,
286
- data_file = str ( Path ( self .cov .config .data_file ). resolve ()),
287
+ data_file = os . path . abspath ( self .cov .config .data_file ), # noqa: PTH100
287
288
config_file = self .cov_config ,
288
289
)
289
290
if not self .cov_append :
0 commit comments