summaryrefslogtreecommitdiff
path: root/numpy/distutils/tests/test_exec_command.py
Commit message (Collapse)AuthorAgeFilesLines
* TST: Skip tests that are not currently supported in wasmHood Chatham2022-11-111-1/+4
|
* TST,MAINT: Replace most `setup` with `setup_method` (also teardown)Sebastian Berg2022-10-271-1/+1
| | | | | | | | In some cases, the replacement is clearly not what is intended, in those (where setup was called explicitly), I mostly renamed `setup` to `_setup`. The `test_ccompile_opt` is a bit confusing, so left it right now (this will probably fail)
* STY: use `with open` when possibleSeth Troisi2020-01-211-3/+2
|
* MAINT: Remove sys.version checks in testsSeth Troisi2020-01-151-4/+1
|
* MAINT: Remove implicit inheritance from object class (#15236)Jon Dufresne2020-01-051-4/+4
| | | | | | | Inheriting from object was necessary for Python 2 compatibility to use new-style classes. In Python 3, this is unnecessary as there are no old-style classes. Dropping the object is more idiomatic Python.
* MAINT: Remove unnecessary 'from __future__ import ...' statementsJon Dufresne2020-01-031-2/+0
| | | | | As numpy is Python 3 only, these import statements are now unnecessary and don't alter runtime behavior.
* DEP: deprecate exec_commandmattip2019-03-101-13/+18
|
* MAINT: Remove all uses of run_module_suite.Charles Harris2018-04-061-5/+1
| | | | | That function is nose specific and has not worked since `__init__` files were added to the tests directories.
* TST: Remove unittest dependencies in numpy/distutils/testsCharles Harris2017-07-171-41/+41
| | | | Also rename some classes that should not begin 'Test'.
* TST: fix test_basic failure on WindowsChristoph Gohlke2017-05-111-1/+1
| | | Echo is a command in the Windows command interpreter
* TST: move exec_command tests out of the file itselfJulian Taylor2017-03-241-0/+127
|
* 2to3: Apply `print` fixer.Charles Harris2013-04-061-1/+1
| | | | | | | Add `print_function` to all `from __future__ import ...` statements and use the python3 print function syntax everywhere. Closes #3078.
* 2to3: Apply `imports` fixer.Charles Harris2013-04-021-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The `imports` fixer deals with the standard packages that have been renamed, removed, or methods that have moved. cPickle -- removed, use pickle commands -- removed, getoutput, getstatusoutput moved to subprocess urlparse -- removed, urlparse moved to urllib.parse cStringIO -- removed, use StringIO or io.StringIO copy_reg -- renamed copyreg _winreg -- renamed winreg ConfigParser -- renamed configparser __builtin__ -- renamed builtins In the case of `cPickle`, it is imported as `pickle` when python < 3 and performance may be a consideration, but otherwise plain old `pickle` is used. Dealing with `StringIO` is a bit tricky. There is an `io.StringIO` function in the `io` module, available since Python 2.6, but it expects unicode whereas `StringIO.StringIO` expects ascii. The Python 3 equivalent is then `io.BytesIO`. What I have done here is used BytesIO for anything that is emulating a file for testing purposes. That is more explicit than using a redefined StringIO as was done before we dropped support for Python 2.4 and 2.5. Closes #3180.
* Merge pull request #3178 from charris/2to3-apply-import-fixernjsmith2013-04-021-0/+2
|\ | | | | 2to3 apply import fixer
| * 2to3: Add `from __future__ import ...` to some files that were missed.Charles Harris2013-03-281-0/+2
| | | | | | | | | | | | | | With the exception of numpy/distutils/tests/test_exec_command.py, all of these files are script files in tools/osxbuild and tools/win32build. The import in the script files omits `absolute_import` as they are not part of a package.
* | MAINT: Fix python3 ResourceWarning when running test_exec_command.pyCharles Harris2013-03-281-0/+4
|/ | | | | | The tests in test_exec_command.py used with blocks with a context manager that could redirect stderr and stdout to temporary files but those files were not closed on exit from the block.
* TST: open the TemporaryFile in ASCII modeOndrej Certik2013-03-251-1/+1
| | | | | | | This should fix gh-3165. Conflicts: numpy/distutils/tests/test_exec_command.py
* TST: skip general test on non-posix platformsOndrej Certik2013-03-101-10/+15
| | | | Add a comment explaining the issue.
* TST: Redirect the other stream to temp. fileOndrej Certik2013-03-101-6/+11
| | | | | | | Now things behave the same if executed with either of: nosetests nosetests -s
* Implement separate checking for stdout and stderrOndrej Certik2013-03-091-4/+3
| | | | And enable a test for this that was failing before.
* TST: add robust tests for exec_command()Ondrej Certik2013-03-091-1/+44
| | | | | | | | | First, we test both stdout and stderr. Second, we now test both _exec_command_posix() and _exec_command(), see numpy/distutils/exec_command.py. This reveals a bug in the implementation which will be fixed in the next commit. For now the failing test is commented out so that all tests still pass.
* BUG: fix issue with distutils.exec_command introduced in 1.7.0.Ralf Gommers2013-03-061-0/+29
Closes gh-2999 and gh-2915. There are several packages (nose, scipy.weave.inline, Sage inline Fortran) that replace stdout, in which case it doesn't have a fileno method. This method was attempted to be used (change in gh-2766 to fix a py3k issue).