Skip to content

Commit 4d4e87f

Browse files
committed
Make test_parseFile hermetic (or at least moreso). Closes jaraco#46.
1 parent 4719971 commit 4d4e87f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cssutils/tests/test_cssutils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def test_parseString(self):
7070
}
7171
self.do_equal_p(tests)
7272

73-
def test_parseFile(self):
73+
def test_parseFile(self, monkeypatch):
7474
"cssutils.parseFile()"
7575
# name if used with open, href used for @import resolving
7676
name = basetest.get_sheet_filename('import.css')
@@ -111,7 +111,7 @@ def test_parseFile(self):
111111

112112
# name is used for open and setting of href automatically
113113
# test needs to be relative to this test file!
114-
os.chdir(os.path.dirname(__file__))
114+
monkeypatch.chdir(os.path.dirname(__file__))
115115
name = basetest.get_sheet_filename('import.css')
116116

117117
s = cssutils.parseFile(name, media='screen', title='from file')

0 commit comments

Comments
 (0)