mirror of
https://github.com/django/django.git
synced 2025-03-26 01:00:46 +00:00
Fixed admin_scripts test failures on macOS.
Regression in 487d904bf253de2f5633f181a168f94086bcd6cb.
This commit is contained in:
parent
cf826c9a91
commit
ed7dee55a9
@ -42,7 +42,9 @@ class AdminScriptTestCase(SimpleTestCase):
|
||||
def setUp(self):
|
||||
tmpdir = tempfile.TemporaryDirectory()
|
||||
self.addCleanup(tmpdir.cleanup)
|
||||
self.test_dir = os.path.join(tmpdir.name, 'test_project')
|
||||
# os.path.realpath() is required for temporary directories on macOS,
|
||||
# where `/var` is a symlink to `/private/var`.
|
||||
self.test_dir = os.path.realpath(os.path.join(tmpdir.name, 'test_project'))
|
||||
os.mkdir(self.test_dir)
|
||||
with open(os.path.join(self.test_dir, '__init__.py'), 'w'):
|
||||
pass
|
||||
|
Loading…
x
Reference in New Issue
Block a user