[pypy-commit] pypy default: Merge AppTestArray with BaseArrayTests, since there is no other subclass left

rlamy pypy.commits at gmail.com
Thu Oct 20 14:05:21 EDT 2016


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: 
Changeset: r87906:c6e3ace7021c
Date: 2016-10-20 19:04 +0100
http://bitbucket.org/pypy/pypy/changeset/c6e3ace7021c/

Log:	Merge AppTestArray with BaseArrayTests, since there is no other
	subclass left

diff --git a/pypy/module/array/test/test_array.py b/pypy/module/array/test/test_array.py
--- a/pypy/module/array/test/test_array.py
+++ b/pypy/module/array/test/test_array.py
@@ -2,7 +2,18 @@
 import pytest
 
 
-class BaseArrayTests:
+class AppTestArray(object):
+    spaceconfig = {'usemodules': ['array', 'struct', '_rawffi', 'binascii']}
+
+    def setup_class(cls):
+        cls.w_array = cls.space.appexec([], """():
+            import array
+            return array.array
+        """)
+        cls.w_tempfile = cls.space.wrap(
+            str(pytest.ensuretemp('array').join('tmpfile')))
+        cls.w_maxint = cls.space.wrap(sys.maxint)
+
     def test_ctor(self):
         assert len(self.array('c')) == 0
         assert len(self.array('i')) == 0
@@ -929,18 +940,6 @@
         assert a[0] == u'b'
 
 
-class AppTestArray(BaseArrayTests):
-    spaceconfig = {'usemodules': ['array', 'struct', '_rawffi', 'binascii']}
-
-    def setup_class(cls):
-        cls.w_array = cls.space.appexec([], """():
-            import array
-            return array.array
-        """)
-        cls.w_tempfile = cls.space.wrap(
-            str(pytest.ensuretemp('array').join('tmpfile')))
-        cls.w_maxint = cls.space.wrap(sys.maxint)
-
     def test_buffer_info(self):
         a = self.array('c', 'Hi!')
         bi = a.buffer_info()


More information about the pypy-commit mailing list