summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoayad Mardini <moayad.m@gmail.com>2014-05-30 13:42:13 +0300
committerTim Graham <timograham@gmail.com>2014-05-30 11:01:42 -0400
commit08a2b3b9cf64c1f1405a24e14500212a613a023c (patch)
tree98fc32f9a61b1a332286492f8a9ee0c630aa260b
parentb266392b638c188daf3621e7f919cc12d65a4e2a (diff)
[1.7.x] Improved the test for refs #22682.
Thanks apollo13 for the review. Backport of 6f4d7f41b1 from master
-rw-r--r--tests/migrations/test_commands.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/tests/migrations/test_commands.py b/tests/migrations/test_commands.py
index 4063a8db8e..a44c415d7d 100644
--- a/tests/migrations/test_commands.py
+++ b/tests/migrations/test_commands.py
@@ -132,6 +132,13 @@ class MakeMigrationsTests(MigrationTestBase):
self._rmrf(self.migration_dir)
except OSError:
pass
+
+ try:
+ self._rmrf(os.path.join(self.test_dir,
+ "test_migrations_path_doesnt_exist"))
+ except OSError:
+ pass
+
os.chdir(self._cwd)
def _rmrf(self, dname):
@@ -439,12 +446,3 @@ class MakeMigrationsTests(MigrationTestBase):
self.assertTrue(os.path.isfile(os.path.join(self.test_dir,
"test_migrations_path_doesnt_exist", "foo", "bar",
"0001_initial.py")))
-
- os.chdir(self.test_dir)
- try:
- self._rmrf(os.path.join(self.test_dir,
- "test_migrations_path_doesnt_exist"))
- pass
- except OSError:
- pass
- os.chdir(self._cwd)