summaryrefslogtreecommitdiff
path: root/numpy/testing/numpytest.py
Commit message (Collapse)AuthorAgeFilesLines
* 2to3: Apply `print` fixer.Charles Harris2013-04-061-2/+2
| | | | | | | Add `print_function` to all `from __future__ import ...` statements and use the python3 print function syntax everywhere. Closes #3078.
* 2to3: Use absolute imports.Charles Harris2013-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new import `absolute_import` is added the `from __future__ import` statement and The 2to3 `import` fixer is run to make the imports compatible. There are several things that need to be dealt with to make this work. 1) Files meant to be run as scripts run in a different environment than files imported as part of a package, and so changes to those files need to be skipped. The affected script files are: * all setup.py files * numpy/core/code_generators/generate_umath.py * numpy/core/code_generators/generate_numpy_api.py * numpy/core/code_generators/generate_ufunc_api.py 2) Some imported modules are not available as they are created during the build process and consequently 2to3 is unable to handle them correctly. Files that import those modules need a bit of extra work. The affected files are: * core/__init__.py, * core/numeric.py, * core/_internal.py, * core/arrayprint.py, * core/fromnumeric.py, * numpy/__init__.py, * lib/npyio.py, * lib/function_base.py, * fft/fftpack.py, * random/__init__.py Closes #3172
* 2to3: Put `from __future__ import division in every python file.Charles Harris2013-03-011-0/+2
| | | | | | | | This should be harmless, as we already are division clean. However, placement of this import takes some care. In the future a script can be used to append new features without worry, at least until such time as it exceeds a single line. Having that ability will make it easier to deal with absolute imports and printing updates.
* 2to3: apply exec fixer results.Charles Harris2013-02-281-1/+1
| | | | This changes the `exec` command to the `exec` function.
* 2to3: Use modern exception syntax.Charles Harris2013-02-261-1/+1
| | | | Example: except ValueError,msg: -> except ValueError as msg:
* 3K: testing: clean up syntax that confused 2to3Pauli Virtanen2009-12-061-2/+3
|
* Remove the following deprecated items from numpy.testing:Alan McIntyre2008-12-311-646/+1
| | | | | | | | | | | | | | | - ParametricTestCase - The following arguments from numpy.testing.Tester.test(): level, verbosity, all, sys_argv, testcase_pattern - Path manipulation functions: set_package_path, set_local_path, restore_path - NumpyTestCase, NumpyTest Also separated testing parameter setup from NoseTester.test into NoseTester.prepare_test_args for use in a utility script for valgrind testing (see NumPy ticket #784).
* ran reindentJarrod Millman2008-08-081-1/+1
|
* Delay import of shlex to reduce startup time.Alan McIntyre2008-07-301-1/+4
|
* Removed unused import of glob.Alan McIntyre2008-07-301-1/+0
|
* Deprecate set_package_path, set_local_path, and restore_path.Alan McIntyre2008-07-031-1/+9
|
* Restore old test framework classes.Alan McIntyre2008-06-211-1/+537
| | | | | | | | | | | Added numpy.testing.run_module_suite to simplify "if __name__ == '__main__'" boilerplate code in test modules. Removed numpy/testing/pkgtester.py since it just consisted of an import statement after porting SciPy r4424. Allow numpy.*.test() to accept the old keyword arguments (but issue a deprecation warning when old arguments are seen). numpy.*.test() returns a test result object as before. Fixed typo in distutils doc.
* Switched to use nose to run tests. Added test and bench functions to all ↵Alan McIntyre2008-06-171-547/+1
| | | | modules.
* Make test(all=True) the default.Charles Harris2008-05-211-1/+1
|
* Fix unit test capturing under Python 2.6.Stefan van der Walt2008-05-201-0/+2
|
* Replace numpy.distutils.exec_command.splitcmdline with shlex.split instead.cookedm2007-12-261-2/+2
| | | | | | | | It has the same problems as our old numpy.distutils.ccompiler.split_quoted. splitcmdline still exists, but uses shlex.split, and issues a DeprecationWarning This has the positive side effect of not having numpy.distutils pulled in when numpy is imported -- there was a use of splitcmdline in numpy.testing.
* testing/numpytest.py: only handle IgnoreException when we have a testcookedm2007-12-241-1/+2
| | | | | result that we can actually work with (for instance, not nose's ResultProxy objects)
* use 'in' keyword to test dictionary membershipJarrod Millman2007-11-281-3/+4
|
* ran reindent.py to clean up whitespaceJarrod Millman2007-10-291-2/+2
|
* allow TestCase classes to be prefixed with either 'test' or 'Test'Jarrod Millman2007-10-021-1/+1
|
* Make test() to return TestResult instance.Pearu Peterson2007-08-301-6/+5
|
* Added testcase pattern feature to testing interface to run only those tests ↵Pearu Peterson2007-08-301-7/+29
| | | | that match given pattern.
* Added a new option to NumpyTest.run command line: -s somestring will replace ↵Pearu Peterson2007-07-201-1/+9
| | | | sys.argv\[1:\] with splitcmdline(somestring)
* Improve docstring formatting for NumpyTestedschofield2007-05-241-21/+26
|
* Add stacklevel=2 to DeprecationWarning for ScipyTestCasecookedm2007-05-151-1/+1
|
* Better warning when using ScipyTestcookedm2007-05-101-1/+1
|
* NumpyTest.test() takes an extra argument, all, which, if true, makescookedm2007-04-221-107/+100
| | | | | it act like NumpyTest.testall(). This comes from some refactoring to remove duplicate code in .test and .testall().
* Sort module names when running testscookedm2007-04-171-1/+4
|
* scratch that last one. my badTim Leslie2007-03-051-1/+1
|
* fix bug with test_suite being called incorrectlyTim Leslie2007-03-051-1/+1
|
* Prepare for doctest-runner.Stefan van der Walt2007-02-101-4/+2
|
* remove some remaining references to scipy. fixes #428Tim Leslie2007-01-261-3/+3
|
* Fix missing import statement. Fix bug where random.permutation did not ↵Travis Oliphant2007-01-191-0/+1
| | | | accept numpy scalars.
* deprecate the use of ScipyTest and ScipyTestCase. fixes #421Tim Leslie2007-01-151-2/+12
|
* Whitespace cleanup.Stefan van der Walt2007-01-081-6/+3
|
* Under Python 2.5 on windows test_multiarray was failing mysteriously. ↵Tim Hochberg2006-10-121-1/+1
| | | | Applying normpath to set_local_path cured that.
* Fix Python 2.5 compatibility to work with new b3 releaseTravis Oliphant2006-08-141-0/+2
|
* `` -> repr in numpy.testingcookedm2006-07-141-3/+5
|
* Scan for abs(level) tests.Stefan van der Walt2006-07-071-1/+1
|
* from Neilen Marais: make numpy.testing compatible with the nosetest package ↵cookedm2006-06-281-1/+1
| | | | with a trivial patch
* Fixed doctest usage 2.4-ism.Pearu Peterson2006-05-031-4/+7
|
* Impl. NumpyTest.testall method that looks for test methods more agrressively ↵Pearu Peterson2006-05-011-1/+124
| | | | than NumpyTest.test
* Changed rundocs to closely follow procedure outlined in the docs for ↵Tim Hochberg2006-04-301-1/+6
| | | | imp.load_module. This fixed a bizzare error where tests would run fine the first time through, but would fail the second time through when loading from a pyc file.
* Added NumpyTestCase.rundocs method to support running doc-tests via unittest ↵Pearu Peterson2006-04-261-0/+15
| | | | machinery - needed for running tests via testoob.
* Added importall function that recursively imports modules. Convinient for ↵Pearu Peterson2006-04-261-0/+25
| | | | detecting any import problems.
* Applied Bryce patch to support TestCase proxy classes.Pearu Peterson2006-04-041-2/+5
|
* Run reindent.py (script distributed with Python) over the source to remove ↵cookedm2006-03-101-3/+3
| | | | extraneous whitespace
* Improved the meaning of test level argument: with negative level return a ↵Pearu Peterson2006-02-241-14/+12
| | | | list of abs(level) unit tests, with a positive value, also run them.
* Documented NumpyTest.test level and verbosity arguments. Added special ↵Pearu Peterson2006-02-241-4/+23
| | | | behaviors.
* Fixed a bug in importing zzz/tests/test_zzz.py when zzz/zzz.py exists. Added ↵Pearu Peterson2006-02-231-24/+54
| | | | check_testcase_name and testfile_patterns to NumpyTest so that different test suite conventions can be used.