MCPcopy Create free account
hub / github.com/numpy/numpy / test_py3_compat

Method test_py3_compat

numpy/lib/tests/test_regression.py:234–247  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

232 raise AssertionError()
233
234 def test_py3_compat(self):
235 # gh-2561
236 # Test if the oldstyle class test is bypassed in python3
237 class C():
238 """Old-style class in python2, normal class in python3"""
239 pass
240
241 out = open(os.devnull, 'w')
242 try:
243 np.info(C(), output=out)
244 except AttributeError:
245 raise AssertionError()
246 finally:
247 out.close()

Callers

nothing calls this directly

Calls 4

openFunction · 0.85
infoMethod · 0.80
CClass · 0.70
closeMethod · 0.45

Tested by

no test coverage detected