diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2014-10-12 13:40:16 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2014-10-12 17:40:49 -0600 |
commit | 8b1f90a227b5fcf2a481c973e522693758c9f20f (patch) | |
tree | 8d39795595278c1c5aa9ab43b70429a9505436db /numpy/lib/tests/test_format.py | |
parent | 8f068b7866a2959392fae2a15c1a5a19ff79bae9 (diff) | |
download | numpy-8b1f90a227b5fcf2a481c973e522693758c9f20f.tar.gz |
TST: Add tests for Python2, Python3 *.npy compatibility.
Diffstat (limited to 'numpy/lib/tests/test_format.py')
-rw-r--r-- | numpy/lib/tests/test_format.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_format.py b/numpy/lib/tests/test_format.py index eea6f1e5c..b266f1c15 100644 --- a/numpy/lib/tests/test_format.py +++ b/numpy/lib/tests/test_format.py @@ -524,6 +524,16 @@ def test_compressed_roundtrip(): assert_array_equal(arr, arr1) +def test_python2_python3_interoperability(): + if sys.version_info[0] >= 3: + fname = 'win64python2.npy' + else: + fname = 'python3.npy' + path = os.path.join(os.path.dirname(__file__), 'data', fname) + data = np.load(path) + assert_array_equal(data, np.ones(2)) + + def test_version_2_0(): f = BytesIO() # requires more than 2 byte for header |