diff options
author | Seth Troisi <sethtroisi@google.com> | 2020-01-08 23:49:17 -0800 |
---|---|---|
committer | Seth Troisi <sethtroisi@google.com> | 2020-01-15 13:19:56 -0800 |
commit | 1427484e9015e73b7017ee9336ce914a6f15187b (patch) | |
tree | 2db89078addee6a01697ab8bd4160c25d59fffc4 /numpy/lib/tests/test_function_base.py | |
parent | b6bc0941d4f07310456079ab2497c3d1bde4a5e7 (diff) | |
download | numpy-1427484e9015e73b7017ee9336ce914a6f15187b.tar.gz |
MAINT: Remove sys.version checks in tests
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
-rw-r--r-- | numpy/lib/tests/test_function_base.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py index dfce2d55d..7953de15d 100644 --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -23,8 +23,6 @@ from numpy.lib import ( from numpy.compat import long -PY2 = sys.version_info[0] == 2 - def get_mat(n): data = np.arange(n) data = np.add.outer(data, data) @@ -1568,11 +1566,8 @@ class TestLeaks: a.f = np.frompyfunc(getattr(a, name), 1, 1) out = a.f(np.arange(10)) a = None - if PY2: - assert_equal(sys.getrefcount(A_func), refcount) - else: - # A.func is part of a reference cycle if incr is non-zero - assert_equal(sys.getrefcount(A_func), refcount + incr) + # A.func is part of a reference cycle if incr is non-zero + assert_equal(sys.getrefcount(A_func), refcount + incr) for i in range(5): gc.collect() assert_equal(sys.getrefcount(A_func), refcount) |