mirror of
https://github.com/docker/compose.git
synced 2025-07-27 07:34:10 +02:00
Merge pull request #3748 from ijc25/master
tearDown the project override at the end of each test case
This commit is contained in:
commit
26b819ca67
@ -114,6 +114,8 @@ class CLITestCase(DockerClientTestCase):
|
|||||||
for n in networks:
|
for n in networks:
|
||||||
if n['Name'].startswith('{}_'.format(self.project.name)):
|
if n['Name'].startswith('{}_'.format(self.project.name)):
|
||||||
self.client.remove_network(n['Name'])
|
self.client.remove_network(n['Name'])
|
||||||
|
if hasattr(self, '_project'):
|
||||||
|
del self._project
|
||||||
|
|
||||||
super(CLITestCase, self).tearDown()
|
super(CLITestCase, self).tearDown()
|
||||||
|
|
||||||
|
@ -63,6 +63,10 @@ class DockerClientTestCase(unittest.TestCase):
|
|||||||
|
|
||||||
cls.client = docker_client(Environment(), version)
|
cls.client = docker_client(Environment(), version)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def tearDownClass(cls):
|
||||||
|
del cls.client
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
for c in self.client.containers(
|
for c in self.client.containers(
|
||||||
all=True,
|
all=True,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user