Skip to content

Commit

Permalink
Make test_parseFile hermetic (or at least moreso). Closes #46.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Mar 30, 2024
1 parent 4719971 commit 4d4e87f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cssutils/tests/test_cssutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def test_parseString(self):
}
self.do_equal_p(tests)

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

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

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

0 comments on commit 4d4e87f

Please sign in to comment.