From 1427484e9015e73b7017ee9336ce914a6f15187b Mon Sep 17 00:00:00 2001 From: Seth Troisi Date: Wed, 8 Jan 2020 23:49:17 -0800 Subject: MAINT: Remove sys.version checks in tests --- numpy/lib/tests/test_function_base.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'numpy/lib/tests/test_function_base.py') 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) -- cgit v1.2.1