Commits

Mike Bayer committed 041dc7a

cleanup

Comments (0)

Files changed (1)

test/orm/test_instrumentation.py

     def test_A(self):
         inits = []
 
-        class A(object): pass
+        class A(object):
+            pass
         self.register(A, inits)
 
         obj = A()
             def __init__(self):
                 inits.append((A, '__init__'))
 
-        class B(A): pass
+        class B(A):
+            pass
         self.register(B, inits)
 
         obj = A()
                 inits.append((A, '__init__'))
         self.register(A, inits)
 
-        class B(A): pass
+        class B(A):
+            pass
         self.register(B, inits)
 
         obj = A()
                 inits.append((A, '__init__'))
         self.register(A, inits)
 
-        class B(A): pass
+        class B(A):
+            pass
 
         class C(B):
             def __init__(self):
                 inits.append((A, '__init__'))
         self.register(A, inits)
 
-        class B(A): pass
+        class B(A):
+            pass
         self.register(B, inits)
 
         class C(B):
                 inits.append((A, '__init__'))
         self.register(A, inits)
 
-        class B(A): pass
+        class B(A):
+            pass
         self.register(B, inits)
 
-        class C(B): pass
+        class C(B):
+            pass
         self.register(C, inits)
 
         obj = A()
     def test_A_Bi_C(self):
         inits = []
 
-        class A(object): pass
+        class A(object):
+            pass
         self.register(A, inits)
 
         class B(A):
                 inits.append((B, '__init__'))
         self.register(B, inits)
 
-        class C(B): pass
+        class C(B):
+            pass
         self.register(C, inits)
 
         obj = A()
     def test_A_B_Ci(self):
         inits = []
 
-        class A(object): pass
+        class A(object):
+            pass
         self.register(A, inits)
 
-        class B(A): pass
+        class B(A):
+            pass
         self.register(B, inits)
 
         class C(B):
     def test_A_B_C(self):
         inits = []
 
-        class A(object): pass
+        class A(object):
+            pass
         self.register(A, inits)
 
-        class B(A): pass
+        class B(A):
+            pass
         self.register(B, inits)
 
-        class C(B): pass
+        class C(B):
+            pass
         self.register(C, inits)
 
         obj = A()
         class A(object):
             pass
 
-        def canary(instance): assert False
+        def canary(instance):
+            assert False
 
         try:
             instrumentation.register_class(A)
 
 class NativeInstrumentationTest(fixtures.ORMTest):
     def test_register_reserved_attribute(self):
-        class T(object): pass
+        class T(object):
+            pass
 
         instrumentation.register_class(T)
         manager = instrumentation.manager_of_class(T)
                   Column('id', Integer, primary_key=True),
                   Column(instrumentation.ClassManager.STATE_ATTR, Integer))
 
-        class T(object): pass
+        class T(object):
+            pass
 
         assert_raises(KeyError, mapper, T, t)
 
                   Column('id', Integer, primary_key=True),
                   Column(instrumentation.ClassManager.MANAGER_ATTR, Integer))
 
-        class T(object): pass
+        class T(object):
+            pass
         assert_raises(KeyError, mapper, T, t)
 
 class Py3KFunctionInstTest(fixtures.ORMTest):
         cls, canary = self._kw_only_fixture()
 
         a = cls("a", b="b", c="c")
-        eq_(canary, [(('a', ), {'b':'b','c':'c'})])
+        eq_(canary, [(('a', ), {'b': 'b', 'c': 'c'})])
 
     def test_kw_plus_posn_args(self):
         cls, canary = self._kw_plus_posn_fixture()
 
         a = cls("a", 1, 2, 3, b="b", c="c")
-        eq_(canary, [(('a', 1, 2, 3), {'b':'b','c':'c'})])
+        eq_(canary, [(('a', 1, 2, 3), {'b': 'b', 'c': 'c'})])
 
     def test_kw_only_args_plus_opt(self):
         cls, canary = self._kw_opt_fixture()
 
         a = cls("a", b="b")
-        eq_(canary, [(('a', ), {'b':'b','c':'c'})])
+        eq_(canary, [(('a', ), {'b': 'b', 'c': 'c'})])
 
         canary[:] = []
         a = cls("a", b="b", c="d")
-        eq_(canary, [(('a', ), {'b':'b','c':'d'})])
+        eq_(canary, [(('a', ), {'b': 'b', 'c': 'd'})])
 
     def test_kw_only_sig(self):
         cls, canary = self._kw_only_fixture()
         t = Table('t', MetaData(),
                   Column('id', Integer, primary_key=True),
                   Column('x', Integer))
-        class A(object): pass
+        class A(object):
+            pass
         mapper(A, t)
 
         a = A()
         t2 = Table('t2', m,
                    Column('id', Integer, primary_key=True),
                    Column('t1_id', Integer, ForeignKey('t1.id')))
-        class A(object): pass
-        class B(object): pass
+        class A(object):
+            pass
+        class B(object):
+            pass
         mapper(A, t1, properties=dict(bs=relationship(B)))
         mapper(B, t2)
 
         assert not a.bs
 
     def test_uninstrument(self):
-        class A(object):pass
+        class A(object):
+            pass
 
         manager = instrumentation.register_class(A)
         attributes.register_attribute(A, 'x', uselist=False, useobject=False)
                 pass
 
         for base in object, Base:
-            class A(base): pass
-            class B(base): pass
+            class A(base):
+                pass
+            class B(base):
+                pass
             mapper(A, t1, properties=dict(bs=relationship(B, backref='a')))
             mapper(B, t2)
 
                    Column('t1_id', Integer, ForeignKey('t1.id')))
 
         class Base(object):
-            def __init__(self): pass
+            def __init__(self):
+                pass
         class Base_AKW(object):
-            def __init__(self, *args, **kwargs): pass
+            def __init__(self, *args, **kwargs):
+                pass
 
         for base in object, Base, Base_AKW:
-            class A(base): pass
-            class B(base): pass
+            class A(base):
+                pass
+            class B(base):
+                pass
             mapper(A, t1)
             mapper(B, t2, properties=dict(a=relationship(A, backref='bs')))