diff options
author | Joseph Martinot-Lagarde <joseph.martinot-lagarde@onera.fr> | 2013-10-09 12:56:10 +0200 |
---|---|---|
committer | Joseph Martinot-Lagarde <joseph.martinot-lagarde@onera.fr> | 2013-10-09 12:56:10 +0200 |
commit | ba3697d88ef5cbc7769b21e14dd4018afc925e50 (patch) | |
tree | b7d20ba321ac080473d5d27c03ea18e69cd5147f /numpy/lib/tests/test_regression.py | |
parent | 293b9e01c5aae668e06522427870c24564a0ebc4 (diff) | |
download | numpy-ba3697d88ef5cbc7769b21e14dd4018afc925e50.tar.gz |
TST: Regression test for gh-2561
Diffstat (limited to 'numpy/lib/tests/test_regression.py')
-rw-r--r-- | numpy/lib/tests/test_regression.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_regression.py b/numpy/lib/tests/test_regression.py index 43c0d8636..d304a47c4 100644 --- a/numpy/lib/tests/test_regression.py +++ b/numpy/lib/tests/test_regression.py @@ -1,5 +1,6 @@ from __future__ import division, absolute_import, print_function +import os import sys import numpy as np @@ -240,6 +241,19 @@ class TestRegression(TestCase): except: raise AssertionError() + def test_py3_compat(self): + # gh-2561 + # Test if the oldstyle class test is bypassed in python3 + class C(): + """Old-style class in python2, normal class in python3""" + pass + + out = open(os.devnull, 'w') + try: + np.info(C(), output=out) + finally: + out.close() + if __name__ == "__main__": run_module_suite() |