mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Used addCleanup() in tests where appropriate.
This commit is contained in:
@@ -26,11 +26,9 @@ except ImportError:
|
||||
class TestArchive(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.testdir = os.path.join(os.path.dirname(__file__), "archives")
|
||||
self.old_cwd = os.getcwd()
|
||||
old_cwd = os.getcwd()
|
||||
os.chdir(self.testdir)
|
||||
|
||||
def tearDown(self):
|
||||
os.chdir(self.old_cwd)
|
||||
self.addCleanup(os.chdir, old_cwd)
|
||||
|
||||
def test_extract_function(self):
|
||||
with os.scandir(self.testdir) as entries:
|
||||
|
||||
Reference in New Issue
Block a user