Skip to content

Commit 3ac2188

Browse files
committed
Fix borg tests
Add a tearDown method that sets the shared state to "Init"
1 parent 2ed51f8 commit 3ac2188

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/creational/test_borg.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@ class BorgTest(unittest.TestCase):
77
def setUp(self):
88
self.b1 = Borg()
99
self.b2 = Borg()
10+
# creating YourBorg instance implicitly sets the state attribute
11+
# for all borg instances.
1012
self.ib1 = YourBorg()
1113

14+
def tearDown(self):
15+
self.ib1.state = "Init"
16+
1217
def test_initial_borg_state_shall_be_init(self):
1318
b = Borg()
1419
self.assertEqual(b.state, "Init")

0 commit comments

Comments
 (0)