File tree 1 file changed +2
-8
lines changed 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -129,11 +129,8 @@ def tmpdir_factory(request, tmpdir_factory):
129
129
"""
130
130
yield tmpdir_factory
131
131
if not request .config .getoption ("--keep-tmpdir" ):
132
- # py.path.remove() uses str paths on Python 2 and cannot
133
- # handle non-ASCII file names. This works around the problem by
134
- # passing a unicode object to rmtree().
135
132
shutil .rmtree (
136
- str ( tmpdir_factory .getbasetemp () ),
133
+ tmpdir_factory .getbasetemp (),
137
134
ignore_errors = True ,
138
135
)
139
136
@@ -155,10 +152,7 @@ def tmpdir(request, tmpdir):
155
152
# This should prevent us from needing a multiple gigabyte temporary
156
153
# directory while running the tests.
157
154
if not request .config .getoption ("--keep-tmpdir" ):
158
- # py.path.remove() uses str paths on Python 2 and cannot
159
- # handle non-ASCII file names. This works around the problem by
160
- # passing a unicode object to rmtree().
161
- shutil .rmtree (str (tmpdir ), ignore_errors = True )
155
+ tmpdir .remove (ignore_errors = True )
162
156
163
157
164
158
@pytest .fixture (autouse = True )
You can’t perform that action at this time.
0 commit comments