From: Mike Bayer Date: Mon, 26 Aug 2019 23:23:10 +0000 (-0400) Subject: Add clear_envs to these tests X-Git-Tag: rel_1_1_0~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d52a785ccc4ec676220a137dfd0dc9cd8a73533a;p=thirdparty%2Fsqlalchemy%2Falembic.git Add clear_envs to these tests Change-Id: If7dd0d6d1a19a3c112c1e13d7d744b1423a4ce28 --- diff --git a/tests/test_version_traversal.py b/tests/test_version_traversal.py index 16cb1a2d..5d22d1cf 100644 --- a/tests/test_version_traversal.py +++ b/tests/test_version_traversal.py @@ -360,6 +360,10 @@ class BranchFromMergepointTest(MigrationTest): splice=True, ) + @classmethod + def teardown_class(cls): + clear_staging_env() + def test_mergepoint_to_only_one_side_upgrade(self): self._assert_upgrade( @@ -440,6 +444,10 @@ class BranchFrom3WayMergepointTest(MigrationTest): splice=True, ) + @classmethod + def teardown_class(cls): + clear_staging_env() + def test_mergepoint_to_only_one_side_upgrade(self): self._assert_upgrade( @@ -533,6 +541,10 @@ class TwinMergeTest(MigrationTest): cls.d2 = env.generate_revision("d2", "d2", head=cls.c2.revision) + @classmethod + def teardown_class(cls): + clear_staging_env() + def test_upgrade(self): head = HeadMaintainer(mock.Mock(), [self.a.revision]) @@ -592,6 +604,10 @@ class NotQuiteTwinMergeTest(MigrationTest): cls.d2 = env.generate_revision("d2", "d2", head=cls.c2.revision) + @classmethod + def teardown_class(cls): + clear_staging_env() + def test_upgrade(self): head = HeadMaintainer(mock.Mock(), [self.a.revision]) @@ -650,6 +666,10 @@ class DependsOnBranchTestOne(MigrationTest): util.rev_id(), "e1->f1", head=cls.e1.revision ) + @classmethod + def teardown_class(cls): + clear_staging_env() + def test_downgrade_to_dependency(self): heads = [self.c2.revision, self.d1.revision] head = HeadMaintainer(mock.Mock(), heads) @@ -728,6 +748,10 @@ class DependsOnBranchTestTwo(MigrationTest): depends_on=[cls.a3.revision, cls.b2.revision, cls.c1.revision], ) + @classmethod + def teardown_class(cls): + clear_staging_env() + def test_kaboom(self): # here's the upgrade path: # ['->c1', '->b2', '->a3', 'overmerge', '->c3', '->c2', 'cmerge', @@ -837,6 +861,10 @@ class DependsOnBranchTestThree(MigrationTest): "a3", "->a3", head="a2", depends_on="b1" ) + @classmethod + def teardown_class(cls): + clear_staging_env() + def test_downgrade_over_crisscross(self): # this state was not possible prior to # #377. a3 would be considered half of a merge point @@ -882,6 +910,10 @@ class DependsOnBranchLabelTest(MigrationTest): util.rev_id(), "e1->f1", head=cls.e1.revision ) + @classmethod + def teardown_class(cls): + clear_staging_env() + def test_upgrade_path(self): self._assert_upgrade( self.c2.revision,