1. Lynn Rees
  2. twoq

Commits

Lynn Rees  committed ff153c5

- fix imports

  • Participants
  • Parent commits 451d328
  • Branches next

Comments (0)

Files changed (21)

File twoq/support.py

View file
 '''twoq support'''
 
 from itertools import chain
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 
 from stuf import six
 # pylint: disable-msg=f0401,w0611

File twoq/tests/active/auto/test_filtering.py

View file
 # -*- coding: utf-8 -*-
 
-try:
-    import unittest2 as unittest
-except ImportError:
-    import unittest
-
-#pylint: disable-msg=w0614,w0401
+from twoq.support import unittest
 from twoq.tests.auto.filtering import *  # @UnusedWildImport
 from twoq.tests.auto.queuing import AQMixin
 
 
     def setUp(self):
         self.maxDiff = None
-        from twoq.active.filtering import afilterq
-        self.qclass = afilterq
+        from twoq.active.filtering import filterq
+        self.qclass = filterq
 
 
 class TestAutoSliceQ(unittest.TestCase, AQMixin, ASliceQMixin):
 
     def setUp(self):
-        from twoq.active.filtering import asliceq
-        self.qclass = asliceq
+        from twoq.active.filtering import sliceq
+        self.qclass = sliceq
 
 
 class TestAutoCollectQ(unittest.TestCase, AQMixin, ACollectQMixin):
 
     def setUp(self):
         self.maxDiff = None
-        from twoq.active.filtering import acollectq
-        self.qclass = acollectq
+        from twoq.active.filtering import collectq
+        self.qclass = collectq
 
 
 class TestAutoSetQ(unittest.TestCase, AQMixin, ASetQMixin):
 
-    '''test automatically synchronized filtering'''
-
     def setUp(self):
-        from twoq.active.filtering import asetq
-        self.qclass = asetq
+        from twoq.active.filtering import setq
+        self.qclass = setq
 
 
 if __name__ == '__main__':

File twoq/tests/active/auto/test_mapping.py

View file
 # -*- coding: utf-8 -*-
 
-try:
-    import unittest2 as unittest
-except ImportError:
-    import unittest
-
-#pylint: disable-msg=w0614,w0401
+from twoq.support import unittest
 from twoq.tests.auto.mapping import *  # @UnusedWildImport
 from twoq.tests.auto.queuing import AQMixin
 
 class TestAutoMap(unittest.TestCase, AQMixin, AMapQMixin):
 
     def setUp(self):
-        from twoq.active.mapping import amapq
-        self.qclass = amapq
+        from twoq.active.mapping import mapq
+        self.qclass = mapq
 
 
 class TestAutoRepeatQ(unittest.TestCase, AQMixin, ARepeatQMixin):
 
     def setUp(self):
-        from twoq.active.mapping import arepeatq
-        self.qclass = arepeatq
+        from twoq.active.mapping import repeatq
+        self.qclass = repeatq
 
 
 class TestAutoDelayQ(unittest.TestCase, AQMixin, ADelayQMixin):
 
     def setUp(self):
-        from twoq.active.mapping import adelayq
-        self.qclass = adelayq
+        from twoq.active.mapping import delayq
+        self.qclass = delayq
 
 
 if __name__ == '__main__':

File twoq/tests/active/auto/test_ordering.py

View file
 # -*- coding: utf-8 -*-
 
-try:
-    import unittest2 as unittest
-except ImportError:
-    import unittest
-
+from twoq.support import unittest
 #pylint: disable-msg=w0614,w0401
 from twoq.tests.auto.ordering import *  # @UnusedWildImport
 from twoq.tests.auto.queuing import AQMixin
 class TestAutoOrderQ(unittest.TestCase, AQMixin, AOrderQMixin):
 
     def setUp(self):
-        from twoq.active.ordering import aorderq
-        self.qclass = aorderq
+        from twoq.active.ordering import orderq
+        self.qclass = orderq
 
 
 class TestAutoRandomQ(unittest.TestCase, AQMixin, ARandomQMixin):
 
     def setUp(self):
-        from twoq.active.ordering import arandomq
-        self.qclass = arandomq
+        from twoq.active.ordering import randomq
+        self.qclass = randomq
 
 
 class TestAutoPermutationQ(unittest.TestCase, AQMixin, ACombineQMixin):
 
     def setUp(self):
-        from twoq.active.ordering import acombineq
-        self.qclass = acombineq
+        from twoq.active.ordering import combineq
+        self.qclass = combineq
 
 
 if __name__ == '__main__':

File twoq/tests/active/auto/test_reducing.py

View file
 # -*- coding: utf-8 -*-
 
-try:
-    import unittest2 as unittest
-except ImportError:
-    import unittest
-
+from twoq.support import unittest
 #pylint: disable-msg=w0614,w0401
 from twoq.tests.auto.reducing import *  # @UnusedWildImport
 from twoq.tests.auto.queuing import AQMixin
 class TestAutoReduceQ(unittest.TestCase, AQMixin, AReduceQMixin):
 
     def setUp(self):
-        from twoq.active.reducing import areduceq
-        self.qclass = areduceq
+        from twoq.active.reducing import reduceq
+        self.qclass = reduceq
 
 
 class TestAutoMathQ(unittest.TestCase, AQMixin, AMathQMixin):
 
     def setUp(self):
-        from twoq.active.reducing import amathq
-        self.qclass = amathq
+        from twoq.active.reducing import mathq
+        self.qclass = mathq
 
 
 class TestAutoTruthQ(unittest.TestCase, AQMixin, ATruthQMixin):
 
     def setUp(self):
-        from twoq.active.reducing import atruthq
-        self.qclass = atruthq
+        from twoq.active.reducing import truthq
+        self.qclass = truthq
 
 
 if __name__ == '__main__':

File twoq/tests/active/man/test_filtering.py

View file
 # -*- coding: utf-8 -*-
 
-try:
-    import unittest2 as unittest
-except ImportError:
-    import unittest
-
+from twoq.support import unittest
 #pylint: disable-msg=w0614,w0401
 from twoq.tests.man.filtering import *  # @UnusedWildImport
 from twoq.tests.man.manning import Manning

File twoq/tests/active/man/test_manq.py

View file
 # -*- coding: utf-8 -*-
 '''manq tests'''
 
-try:
-    import unittest2 as unittest
-except ImportError:
-    import unittest
-
+from twoq.support import unittest
 from twoq.tests.man.manning import Manning
 from twoq.tests.man.queuing import MQMixin
 from twoq.tests.man.mapping import MMapQMixin
 
 
 class TestManQ(
-    Manning, MQMixin, MFilterQMixin, MMapQMixin, MReduceQMixin,
-    MOrderQMixin,
+    Manning, MQMixin, MFilterQMixin, MMapQMixin, MReduceQMixin, MOrderQMixin,
 ):
 
     def setUp(self):

File twoq/tests/active/man/test_mapping.py

View file
 # -*- coding: utf-8 -*-
 
-try:
-    import unittest2 as unittest
-except ImportError:
-    import unittest
-
+from twoq.support import unittest
 #pylint: disable-msg=w0614,w0401
 from twoq.tests.man.mapping import *  # @UnusedWildImport
 from twoq.tests.man.manning import Manning

File twoq/tests/active/man/test_ordering.py

View file
 # -*- coding: utf-8 -*-
 
-try:
-    import unittest2 as unittest
-except ImportError:
-    import unittest
-
+from twoq.support import unittest
 #pylint: disable-msg=w0614,w0401
 from twoq.tests.man.ordering import *  # @UnusedWildImport
 from twoq.tests.man.manning import Manning

File twoq/tests/active/man/test_reducing.py

View file
 # -*- coding: utf-8 -*-
 
-try:
-    import unittest2 as unittest
-except ImportError:
-    import unittest
-
+from twoq.support import unittest
 #pylint: disable-msg=w0614,w0401
 from twoq.tests.man.reducing import *  # @UnusedWildImport
 from twoq.tests.man.manning import Manning

File twoq/tests/auto/filtering.py

View file
             [('age', 40), ('name', 'moe'), ('age', 50), ('name', 'larry'),
             ('age', 60), ('name', 'curly')],
         )
-        
+
     def test_extract(self):
         from inspect import isclass
-        class stooges:
+        class stooges: #@IgnorePep8
             name = 'moe'
             age = 40
         class stoog2: #@IgnorePep8

File twoq/tests/lazy/auto/test_autoq.py

View file
 # -*- coding: utf-8 -*-
 '''autoq tests'''
 
-try:
-    import unittest2 as unittest
-except ImportError:
-    import unittest
-
+from twoq.support import unittest
 from twoq.tests.auto.queuing import AQMixin
 from twoq.tests.auto.mapping import AMapQMixin
 from twoq.tests.auto.ordering import AOrderQMixin

File twoq/tests/lazy/auto/test_filtering.py

View file
 # -*- coding: utf-8 -*-
 
-try:
-    import unittest2 as unittest
-except ImportError:
-    import unittest
-
+from twoq.support import unittest
 #pylint: disable-msg=w0614,w0401
 from twoq.tests.auto.filtering import *  # @UnusedWildImport
 from twoq.tests.auto.queuing import AQMixin
 
     def setUp(self):
         self.maxDiff = None
-        from twoq.lazy.filtering import afilterq
-        self.qclass = afilterq
+        from twoq.lazy.filtering import filterq
+        self.qclass = filterq
 
 
 class TestAutoSliceQ(unittest.TestCase, AQMixin, ASliceQMixin):
 
     def setUp(self):
-        from twoq.lazy.filtering import asliceq
-        self.qclass = asliceq
+        from twoq.lazy.filtering import sliceq
+        self.qclass = sliceq
 
 
 class TestAutoCollectQ(unittest.TestCase, AQMixin, ACollectQMixin):
 
     def setUp(self):
         self.maxDiff = None
-        from twoq.lazy.filtering import acollectq
-        self.qclass = acollectq
+        from twoq.lazy.filtering import collectq
+        self.qclass = collectq
 
 
 class TestAutoSetQ(unittest.TestCase, AQMixin, ASetQMixin):
 
-    '''test automatically synchronized filtering'''
-
     def setUp(self):
-        from twoq.lazy.filtering import asetq
-        self.qclass = asetq
+        from twoq.lazy.filtering import setq
+        self.qclass = setq
 
 
 if __name__ == '__main__':

File twoq/tests/lazy/auto/test_mapping.py

View file
 # -*- coding: utf-8 -*-
 
-try:
-    import unittest2 as unittest
-except ImportError:
-    import unittest
-
+from twoq.support import unittest
 #pylint: disable-msg=w0614,w0401
 from twoq.tests.auto.mapping import *  # @UnusedWildImport
 from twoq.tests.auto.queuing import AQMixin
 class TestAutoMap(unittest.TestCase, AQMixin, AMapQMixin):
 
     def setUp(self):
-        from twoq.lazy.mapping import amapq
-        self.qclass = amapq
+        from twoq.lazy.mapping import mapq
+        self.qclass = mapq
 
 
 class TestAutoRepeatQ(unittest.TestCase, AQMixin, ARepeatQMixin):
 
     def setUp(self):
-        from twoq.lazy.mapping import arepeatq
-        self.qclass = arepeatq
+        from twoq.lazy.mapping import repeatq
+        self.qclass = repeatq
 
 
 class TestAutoDelayQ(unittest.TestCase, AQMixin, ADelayQMixin):
 
     def setUp(self):
-        from twoq.lazy.mapping import adelayq
-        self.qclass = adelayq
+        from twoq.lazy.mapping import delayq
+        self.qclass = delayq
 
 if __name__ == '__main__':
     unittest.main()

File twoq/tests/lazy/auto/test_ordering.py

View file
 # -*- coding: utf-8 -*-
 
-try:
-    import unittest2 as unittest
-except ImportError:
-    import unittest
-
+from twoq.support import unittest
 #pylint: disable-msg=w0614,w0401
 from twoq.tests.auto.ordering import *  # @UnusedWildImport
 from twoq.tests.auto.queuing import AQMixin
 class TestAutoOrderQ(unittest.TestCase, AQMixin, AOrderQMixin):
 
     def setUp(self):
-        from twoq.lazy.ordering import aorderq
-        self.qclass = aorderq
+        from twoq.lazy.ordering import orderq
+        self.qclass = orderq
 
 
 class TestAutoRandomQ(unittest.TestCase, AQMixin, ARandomQMixin):
 
     def setUp(self):
-        from twoq.lazy.ordering import arandomq
-        self.qclass = arandomq
+        from twoq.lazy.ordering import randomq
+        self.qclass = randomq
 
 
 class TestAutoPermutationQ(unittest.TestCase, AQMixin, ACombineQMixin):
 
     def setUp(self):
-        from twoq.lazy.ordering import acombineq
-        self.qclass = acombineq
+        from twoq.lazy.ordering import combineq
+        self.qclass = combineq
 
 if __name__ == '__main__':
     unittest.main()

File twoq/tests/lazy/auto/test_reducing.py

View file
 # -*- coding: utf-8 -*-
 
-try:
-    import unittest2 as unittest
-except ImportError:
-    import unittest
-
+from twoq.support import unittest
 #pylint: disable-msg=w0614,w0401
 from twoq.tests.auto.reducing import *  # @UnusedWildImport
 from twoq.tests.auto.queuing import AQMixin
 class TestAutoReduceQ(unittest.TestCase, AQMixin, AReduceQMixin):
 
     def setUp(self):
-        from twoq.lazy.reducing import areduceq
-        self.qclass = areduceq
+        from twoq.lazy.reducing import reduceq
+        self.qclass = reduceq
 
 
 class TestAutoMathQ(unittest.TestCase, AQMixin, AMathQMixin):
 
     def setUp(self):
-        from twoq.lazy.reducing import amathq
-        self.qclass = amathq
+        from twoq.lazy.reducing import mathq
+        self.qclass = mathq
 
 
 class TestAutoTruthQ(unittest.TestCase, AQMixin, ATruthQMixin):
 
     def setUp(self):
-        from twoq.lazy.reducing import atruthq
-        self.qclass = atruthq
+        from twoq.lazy.reducing import truthq
+        self.qclass = truthq
 
 
 if __name__ == '__main__':

File twoq/tests/lazy/man/test_filtering.py

View file
 # -*- coding: utf-8 -*-
 
-try:
-    import unittest2 as unittest
-except ImportError:
-    import unittest
-
+from twoq.support import unittest
 #pylint: disable-msg=w0614,w0401
 from twoq.tests.man.filtering import *  # @UnusedWildImport
 from twoq.tests.man.manning import Manning

File twoq/tests/lazy/man/test_manq.py

View file
 # -*- coding: utf-8 -*-
 '''manq tests'''
 
-try:
-    import unittest2 as unittest
-except ImportError:
-    import unittest
-
+from twoq.support import unittest
 from twoq.tests.man.manning import Manning
 from twoq.tests.man.queuing import MQMixin
 from twoq.tests.man.mapping import MMapQMixin

File twoq/tests/lazy/man/test_mapping.py

View file
 # -*- coding: utf-8 -*-
 
-try:
-    import unittest2 as unittest
-except ImportError:
-    import unittest
-
+from twoq.support import unittest
 #pylint: disable-msg=w0614,w0401
 from twoq.tests.man.mapping import *  # @UnusedWildImport
 from twoq.tests.man.queuing import MQMixin

File twoq/tests/lazy/man/test_ordering.py

View file
 # -*- coding: utf-8 -*-
 
-try:
-    import unittest2 as unittest
-except ImportError:
-    import unittest
-
+from twoq.support import unittest
 #pylint: disable-msg=w0614,w0401
 from twoq.tests.man.ordering import *  # @UnusedWildImport
 from twoq.tests.man.queuing import MQMixin

File twoq/tests/lazy/man/test_reducing.py

View file
 # -*- coding: utf-8 -*-
 
-try:
-    import unittest2 as unittest
-except ImportError:
-    import unittest
-
+from twoq.support import unittest
 #pylint: disable-msg=w0614,w0401
 from twoq.tests.man.reducing import *  # @UnusedWildImport
 from twoq.tests.man.queuing import MQMixin