Skip to content

Commit 54565b3

Browse files
author
fkromer
committed
change: some as little pylint cleanup as possible
1 parent ebf064f commit 54565b3

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

test_observer.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

88
if sys.version_info < (2, 7):
99
import unittest2 as unittest
10-
10+
1111
else:
1212
import unittest
13-
13+
1414
from unittest.mock import patch
1515

1616
class TestSubject(unittest.TestCase):
@@ -52,10 +52,11 @@ def setUpClass(cls):
5252
cls.sub.attach(cls.hex_obs)
5353

5454
def test_data_change_shall_notify_all_observers_once(cls):
55-
with patch.object(cls.dec_obs, 'update') as mock_dec_obs_update, patch.object(cls.hex_obs, 'update') as mock_hex_obs_update:
56-
cls.sub.data = 10
57-
cls.assertEqual(mock_dec_obs_update.call_count, 1)
58-
cls.assertEqual(mock_hex_obs_update.call_count, 1)
55+
with patch.object(cls.dec_obs, 'update') as mock_dec_obs_update,\
56+
patch.object(cls.hex_obs, 'update') as mock_hex_obs_update:
57+
cls.sub.data = 10
58+
cls.assertEqual(mock_dec_obs_update.call_count, 1)
59+
cls.assertEqual(mock_hex_obs_update.call_count, 1)
5960

6061
def test_data_value_shall_be_changeable(cls):
6162
cls.sub.data = 20

0 commit comments

Comments
 (0)