summaryrefslogtreecommitdiffstats
path: root/Lib/packaging/tests/support.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove packaging from the standard library.Éric Araujo2012-06-241-400/+0
| | | | | | Distutils2 will live on on PyPI and be included in the stdlib when it is ready. See discussion starting at http://mail.python.org/pipermail/python-dev/2012-June/120430.html
* Fix code I unwittingly broke in b0e2d6592a1f (#14038)Éric Araujo2012-02-171-1/+1
|
* Synchronize packaging.tests.support with distutils2Éric Araujo2012-02-091-19/+22
|
* Issue #13901: Prevent test_packaging failures on OS X with --enable-shared.Ned Deily2012-02-031-3/+8
|
* Clean up mocking of stdout and stdin in packaging tests.Éric Araujo2011-11-061-1/+17
| | | | | | | | Running with regrtest does not show spurious output or unrestored sys.std* objects; sometimes running with make test is different, I’ll watch the buildbots. In addition, update the create module to use logging.
* Undo potentially confusing name change in packaging.Éric Araujo2011-11-061-1/+1
| | | | | | | | | | | This method was named reinitialize_command in distutils and accompanied by a comment suggesting to change it to get_reinitialized_command. Following that, I did the change for distutils2, but it proved confusing: The Distribution object has an internal cache of command objects, to make sure only one instance is ever used, and the name get_reinitialized_command could suggest that the object returned was independent of that cache, which it was not. I’m reverting the name change to make code clearer.
* Make sure packaging tests that register custom commands also clear themÉric Araujo2011-11-061-1/+14
|
* Improve byte-compilation in packaging to be independent of -O or -B.Éric Araujo2011-11-031-1/+5
| | | | | | | | | | | | | | | | | | | | | The code I fixed to comply with PEP 3147 still had one bug: When run under python -O, some paths for pyc files would be pyo, because I called imp.cache_from_source without explicit debug_override argument in some places, and under -O that would return .pyo (this is well explained in the imp docs). Now all code (util.byte_compile, build_py, install_lib) can create .pyo files according to options given by users, without interference from the calling Python’s own optimize mode. On a related topic, I also removed the code that prevented byte compilation under python -B. The rationale is that packaging gives control over the creation of pyc files to the user with its own explicit option, and the behavior should not be changed if the calling Python happens to run with -B for whatever reason. I will argue that this is a bug fix and ask to be allowed to backport this change to distutils. Finally, I moved one nugget of information about the --compile and --optimize options from the source into the doc. It clears up a misunderstanding that I (and maybe other people) had.
* Change signature of packaging.tests.support.LoggingCatcher.get_logs.Éric Araujo2011-10-191-19/+20
| | | | | | I need this for some tests, and it makes code clearer. This commit also changes some assertEqual calls to use (actual, expected) order and fix some pyflakes warnings.
* Cleanup in packaging: super considered superÉric Araujo2011-10-141-1/+1
|
* Minor: tweak docstrings and __all__ in packaging.tests.supportÉric Araujo2011-09-011-13/+27
|
* Fix test_packaging on Windows (#12678).Éric Araujo2011-08-241-2/+2
| | | | See the distutils commit message for more detail.
* Try to fix packaging tests using build_ext on Windows (#12678)Éric Araujo2011-08-231-11/+18
|
* Factor out the build_ext fixup for shared Python builds.Éric Araujo2011-08-211-1/+27
| | | | I need this to fix the failing test_command_install_dist.
* Refactor the copying of xxmodule.c in packaging tests (#12141).Éric Araujo2011-08-201-1/+34
| | | | | | | | | | | I need to copy this file in another test too, so I moved the support code to distutils.tests.support and improved it to use proper skip machinery instead of custom print/return/test suite fiddling. Contrary to my similar change in distutils tests, I did not add support for finding xxmodule.c when running a test from the tests directory, because in that case my compiler didn’t find Python.h, so I figured it’s better to skip than to fail.
* Silence 2to3 warnings in packaging testsÉric Araujo2011-07-151-4/+8
|
* Issue #12333: close files before removing the directoryVictor Stinner2011-06-171-3/+2
| | | | | packaging.tests.support.TempdirManager: rmtree() fails on Windows if there are still open files in the directory.
* Issue #12333: restore the previous dir before removing the current directoryVictor Stinner2011-06-171-8/+5
| | | | | | | packaging.tests.support.TempdirManager: removing the current directory is not allowed on Windows or Solaris. Store the current directory and restore it before removing the temporary directory (which is used as the working directory during the tests).
* Document autoflushing in packaging.test.support.LoggingCatcher.get_logs.Éric Araujo2011-06-031-1/+4
| | | | | | I’m afraid my docstring is not as clear as it should be, but I can’t find a concise way of describing what the code does. Suggestions for improvements welcome.
* Make packaging.tests.support.LoggingCatcher.get_logs flush the log handler.Éric Araujo2011-06-021-7/+13
| | | | | This removes the need to call flush manually in each test, except when testing code that creates warning without checking them.
* Issue #12180: Fixed a few remaining errors in test_packaging when no threading.Tarek Ziade2011-05-251-0/+9
|
* Issue #12167: packaging.tests.support, LoggingCatcher restores correctly theVictor Stinner2011-05-241-1/+2
| | | | log level. Avoid also calls to .addCleanup() in setUp().
* fixed a few mocking/cleanup issues in packaging test_util for win32Tarek Ziade2011-05-211-10/+12
|
* Skip tests that require zlib in the packaging tests. Also add a ↵Ezio Melotti2011-05-191-1/+2
| | | | requires_zlib decorator to test.support.
* Issue #12112: packaging reads and writes setup.cfg using UTF-8Victor Stinner2011-05-191-2/+2
|
* packaging: use with open() instead of try/finally: closeVictor Stinner2011-05-191-4/+1
|
* initial import of the packaging package in the standard libraryTarek Ziade2011-05-191-0/+259