Skip to content

Commit 0c24c31

Browse files
committed
Allow _fixture_on_path to be called imperatively.
1 parent 6ffdcb9 commit 0c24c31

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

tests/fixtures.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,4 +309,3 @@ def setUp(self):
309309
# Add self.zip_name to the front of sys.path.
310310
self.resources = contextlib.ExitStack()
311311
self.addCleanup(self.resources.close)
312-
self._fixture_on_path(self.zip_name)

tests/test_zip.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313

1414

1515
class TestZip(fixtures.ZipFixtures, unittest.TestCase):
16-
zip_name = 'example-21.12-py3-none-any.whl'
16+
def setUp(self):
17+
super().setUp()
18+
self._fixture_on_path('example-21.12-py3-none-any.whl')
1719

1820
def test_zip_version(self):
1921
self.assertEqual(version('example'), '21.12')
@@ -46,7 +48,9 @@ def test_one_distribution(self):
4648

4749

4850
class TestEgg(TestZip):
49-
zip_name = 'example-21.12-py3.6.egg'
51+
def setUp(self):
52+
super().setUp()
53+
self._fixture_on_path('example-21.12-py3.6.egg')
5054

5155
def test_files(self):
5256
for file in files('example'):

0 commit comments

Comments
 (0)