diff options
author | Alexandr Shadchin <alexandr.shadchin@gmail.com> | 2016-12-08 17:15:52 +0500 |
---|---|---|
committer | Alexandr Shadchin <alexandr.shadchin@gmail.com> | 2016-12-09 16:22:24 +0500 |
commit | 15f52f530c4dc1af69e93aae60d81c2008101639 (patch) | |
tree | 6d445533dc4477f9cd5f27469addf9f9edef74ed /numpy/lib/tests | |
parent | 58394d6c27b3ff03f70b07580036a1b96c7a4608 (diff) | |
download | numpy-15f52f530c4dc1af69e93aae60d81c2008101639.tar.gz |
MAINT: Other cleanup Python < 2.7 and Python3 < 3.4
Diffstat (limited to 'numpy/lib/tests')
-rw-r--r-- | numpy/lib/tests/test_format.py | 11 | ||||
-rw-r--r-- | numpy/lib/tests/test_io.py | 10 |
2 files changed, 4 insertions, 17 deletions
diff --git a/numpy/lib/tests/test_format.py b/numpy/lib/tests/test_format.py index 892b32a9c..7cc72e775 100644 --- a/numpy/lib/tests/test_format.py +++ b/numpy/lib/tests/test_format.py @@ -553,18 +553,7 @@ def test_pickle_python2_python3(): 'py3-objarr.npy', 'py3-objarr.npz']: path = os.path.join(data_dir, fname) - if (fname.endswith('.npz') and sys.version_info[0] == 2 and - sys.version_info[1] < 7): - # Reading object arrays directly from zipfile appears to fail - # on Py2.6, see cfae0143b4 - continue - for encoding in ['bytes', 'latin1']: - if (sys.version_info[0] >= 3 and sys.version_info[1] < 4 and - encoding == 'bytes'): - # The bytes encoding is available starting from Python 3.4 - continue - data_f = np.load(path, encoding=encoding) if fname.endswith('.npz'): data = data_f['x'] diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py index 61c9c0636..83fca5b91 100644 --- a/numpy/lib/tests/test_io.py +++ b/numpy/lib/tests/test_io.py @@ -133,13 +133,11 @@ class RoundtripTest(object): self.check_roundtrips(a) def test_array_object(self): - if sys.version_info[:2] >= (2, 7): - a = np.array([], object) - self.check_roundtrips(a) + a = np.array([], object) + self.check_roundtrips(a) - a = np.array([[1, 2], [3, 4]], object) - self.check_roundtrips(a) - # Fails with UnpicklingError: could not find MARK on Python 2.6 + a = np.array([[1, 2], [3, 4]], object) + self.check_roundtrips(a) def test_1D(self): a = np.array([1, 2, 3, 4], int) |