File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,9 +19,19 @@ def result_lines(result):
1919 ]
2020
2121
22+ def _unlink_path (path , missing_ok = False ):
23+ # Replicate 3.8+ functionality in 3.7
24+ cm = contextlib .nullcontext ()
25+ if missing_ok :
26+ cm = contextlib .suppress (FileNotFoundError )
27+
28+ with cm :
29+ path .unlink ()
30+
31+
2232def replace_file_with_dir (pathspec ):
2333 path = pathlib .Path (pathspec )
24- path . unlink ( missing_ok = True )
34+ _unlink_path ( path , missing_ok = True )
2535 path .mkdir (exist_ok = True )
2636 return path
2737
Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ deps=pytest>=3.1.0
1515
1616setenv =
1717 cov: COVERAGE ={[testenv]cov_args}
18- TEST_TEMPLATE_BASE ={toxinidir}/ test/ templates
19- TEST_MODULE_BASE ={env:TEST_TEMPLATE_BASE}/ modules
18+ TEST_TEMPLATE_BASE ={toxinidir}{/} test{/} templates
19+ TEST_MODULE_BASE ={env:TEST_TEMPLATE_BASE}{/} modules
2020
2121commands =pytest {env:COVERAGE:} {posargs}
2222
You can’t perform that action at this time.
0 commit comments