Commit 29fa8b9c authored by Denis Bilenko's avatar Denis Bilenko

test__local.py: pep8

parent c64fd0a4
...@@ -5,18 +5,23 @@ from gevent import monkey; monkey.patch_all() ...@@ -5,18 +5,23 @@ from gevent import monkey; monkey.patch_all()
from threading import local from threading import local
class A(local): class A(local):
__slots__ = ['initialized','obj'] __slots__ = ['initialized', 'obj']
path = '' path = ''
def __init__(self, obj): def __init__(self, obj):
if not hasattr(self, 'initialized'): if not hasattr(self, 'initialized'):
self.obj = obj self.obj = obj
self.path = '' self.path = ''
class Obj(object): class Obj(object):
pass pass
class GeventLocalTestCase(unittest.TestCase): class GeventLocalTestCase(unittest.TestCase):
def test_copy(self): def test_copy(self):
...@@ -45,7 +50,7 @@ class GeventLocalTestCase(unittest.TestCase): ...@@ -45,7 +50,7 @@ class GeventLocalTestCase(unittest.TestCase):
""" """
a = A({}) a = A({})
a.path = '123' a.path = '123'
b = A({'one':2}) b = A({'one': 2})
b.path = '123' b.path = '123'
self.assertEqual(a.path, b.path, 'The values in the two objects must be equal') self.assertEqual(a.path, b.path, 'The values in the two objects must be equal')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment