summaryrefslogtreecommitdiff
path: root/numpy/distutils/tests
Commit message (Collapse)AuthorAgeFilesLines
* MAINT: remove unused f2py and SWIG tests from numpy.distutils.Ralf Gommers2016-01-0623-291/+0
|
* MAINT: remove outdated Pyrex support from distutils (as far as possible).Ralf Gommers2016-01-065-52/+0
|
* MAINT: Simplify some tests using temppath context manager.Charles Harris2015-12-261-33/+21
| | | | | | | | | | | | | | | | | | | | | | | | This replaces code of the pattern ``` fd, name = tempfile.mkstemp(...) os.close(fd) try: do stuff with name finally: os.remove(name) ``` with ``` with temppath() as name: do stuff with name ``` A few more complicated cases are also handled. The remains some particularly gnarly code the could probably be refactored to use temppath, but that is a more demanding project.
* MAINT: Dictionary litteralRémy Léone2015-11-071-9/+8
|
* TST: use os.pathsep to separate library directoriesChristoph Gohlke2015-08-011-2/+3
|
* TST: skip gcc specific test when using msvcChristoph Gohlke2015-08-011-0/+2
|
* TST: alternatively assert existence of msvc .obj filesChristoph Gohlke2015-08-011-1/+2
| | | Fixes test_system_info.TestSystemInfoReading.test_compile1 failure on Windows
* STY: PEP8 and pyflakes fixes for numpy/distutils.Charles Harris2015-07-2510-36/+40
|
* Merge pull request #5597 from zerothi/ENH-distutilsCharles Harris2015-04-241-0/+203
|\ | | | | BLD, ENH: Reading of extra flags from site.cfg to extend flexibility
| * BUG: Had thought the defaults where made of lists, it is simply a str.Nick Papior Andersen2015-02-261-7/+7
| | | | | | | | Changed all lists to strings
| * ENH: rpath and runtime_library_dirs equivalentNick Papior Andersen2015-02-261-1/+5
| | | | | | | | | | | | | | | | | | The original distutils assumes runtime_library_dirs to be located in rpath, however, the internal structures assumes the keyword to be runtime_library_dirs. For now numpy.distutils handles both equivalently. The test has been updated to also test the rpath solution.
| * BUG: Python3 fixNick Papior Andersen2015-02-251-4/+5
| | | | | | | | | | | | Direct writing to files is not the same for 2vs3. Hence we now close the file handle, re-open it and write using the file.
| * BUG: PEP correctionsNick Papior Andersen2015-02-251-71/+79
| | | | | | | | | | | | | | | | | | | | | | More corrections pointed out by Ralf Changed the get_standard_file to a fully temporary file. This means that the __init__ diverges a bit from the system_info object. However, it only has to do with the setup for the test. All internal things regarding the object have not been altered. I have checked on my box that all files/directories are removed.
| * BUG: PEP corrections and streamlined with numpy dev lineNick Papior Andersen2015-02-251-41/+23
| | | | | | | | | | | | | | | | | | Changed self.assert* to assert_ instances through numpys own testing utilities. Fixes for the rst document. Removed unnecessary import statements in the test.
| * BUG: Trying to fix travis buildsNick Papior Andersen2015-02-241-5/+4
| | | | | | | | | | | | | | The error of getcwd on 2.6 was due to previous fault. We should not request include_dirs as they are not provided. For python 3 I forgot the top ascii writing.
| * BUG: Trying to fix travis buildsNick Papior Andersen2015-02-241-30/+36
| | | | | | | | | | | | | | The test on Travis does not allow getcwd on python 2.6 The test for python 3+ already is in unicode, hence the str representation was wrong.
| * ENH: Added tests to the extra options read inNick Papior Andersen2015-02-241-0/+203
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A simple test (distutils/testing/test_system_info.py) to check that the options are read in correctly has been added. This test has a few faults: A) It does not allow strict library checks as that can be _very_ system dependent. B) It compiles some simple C-programs but does currently not link them to a shared library. C) As such the test does not check that the flags are actually used. To circumvent this one should: A) Make a library of the compiled sources. B) Check that a runtime_library_dirs is working by checking with ldd C) Make a preprocessor flag to check the output of two commands which should differ according to the flags in each block I am not too much into the distutils compiler suite. So I have not endeavoured on this path. - The current test shows that the flags are read in by the standard system_info object and can thus be considered a "stable" solution. - Added note of the 1.10 release schedule. - Corrected the site.cfg.example, added runtime_library_dirs to the OpenBLAS example where it seems appropriate. - Bugfix for the site.cfg.example (the [DEFAULT] block should be name [ALL]) This might have lead to some confusion, but many of the libraries are linked explicitly by their own sections, hence it might not have been caught.
* | BLD: distutils: more robust gfortran version checking. Closes gh-5768.Ralf Gommers2015-04-191-1/+7
| |
* | MAINT: distutils: fix gfortran version check when gfortran emits warnings.Ralf Gommers2015-03-071-1/+6
|/
* BLD: Change Fortran version flag and string checkRyan Nelson2014-12-011-6/+2
| | | | | | | The version check flag for GnuFCompiler and Gnu95FCompiler were changed from `--version` to `-dumpversion`. This simplifies the gnu_version_match code for gfortran, and makes it possible to drop much of the check code for g77 as well. This fix addresses issue #5315 and #5321.
* Revert "Merge pull request #4421 from meltingwax/meltingwax/4382"Daniel da Silva2014-03-051-66/+9
| | | | Caused SciPy tests to fail when built with this NumPy.
* BUG: Fix support for builds in dirs with whitespaceDaniel da Silva2014-03-051-9/+66
| | | | | | Add escaping and quoting of dirs and enabled POSIX support in lexer. Closes #4382.
* STY: Giant comma spacing fixup.Charles Harris2013-08-1811-46/+46
| | | | | | | Run the 2to3 ws_comma fixer on *.py files. Some lines are now too long and will need to be broken at some point. OTOH, some lines were already too long and need to be broken at some point. Now seems as good a time as any to do this with open PRs at a minimum.
* BUG: Handle a version string from a custom-built mingw64.mwtoews2013-05-291-0/+1
| | | | | | | | The custom build compiler "GNU Fortran (rubenvb-4.8.0) 4.8.0" was incorrectly parsed as version '-4.8.0' and the flag "-mno-cygwin" was added to the compilation. See http://cens.ioc.ee/pipermail/f2py-users/2010-October/002092.html.
* BUG: hardcode some known shared library extensionsJulian Taylor2013-04-281-1/+17
| | | | | | | | the configuration variables are not a reliable mean to get the shared library extension. darwin, windows and debug linux are wrong in these variables. SHLIB_SUFFIX is also wrong as of python 3.3.1 closes #3057
* 2to3: Apply `repr` fixer.Charles Harris2013-04-081-2/+2
| | | | | | | | | | | | This replaces python backtics with repr(...). The backtics were mostly used to generate strings for printing with a string format and it is tempting to replace `'%s' % repr(x)` with `'%r' % x`. That would work except where `x` happened to be a tuple or a dictionary but, because it would be significant work to guarantee that and because there are not many places where backtics are used, the safe path is to let the repr replacements stand. Closes #3083.
* 2to3: Apply `print` fixer.Charles Harris2013-04-0622-22/+22
| | | | | | | 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-0216-15/+17
|\ | | | | 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.
| * 2to3: Use absolute imports.Charles Harris2013-03-2815-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | 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).
* 2to3: Put `from __future__ import division in every python file.Charles Harris2013-03-0121-0/+35
| | | | | | | | 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.
* STY: Replace assert by assert_ in tests. There remain 124 uses ofCharles Harris2011-04-052-6/+6
| | | | assert in non-testing files that should be checked for correctness.
* BUG: fix 64-bit Intel Fortran compiler detection. Closes #1448.rgommers2011-03-091-0/+34
|
* DEP: Fix more files for unittest deprecated functions. It isn't clear why theseCharles Harris2010-02-211-18/+18
| | | | tests didn't issue deprecation warnings. Are they being run?
* 3K: encode str to bytes before writing in distutils/testsPauli Virtanen2009-12-061-2/+2
|
* Fix npy_pkg_config unit test failures.David Cournapeau2009-07-261-4/+6
|
* Add parse_flags function + some unit tests.David Cournapeau2009-07-261-1/+23
|
* Add two unit-tests for LibraryInfo.David Cournapeau2009-07-261-0/+72
|
* Remove unused imports.Alan McIntyre2008-09-131-8/+5
|
* Remove uses of set_package_path, set_local_path, restore_path, and Alan McIntyre2008-07-056-17/+3
| | | | associated sys.path manipulations.
* Clean up test output such that a completely-passing test suite has no ↵Robert Kern2008-07-031-2/+0
| | | | extraneous output.
* Restore old test framework classes.Alan McIntyre2008-06-218-8/+8
| | | | | | | | | | | 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.