summaryrefslogtreecommitdiffstats
path: root/Lib/packaging/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix incorrect test.Éric Araujo2011-10-061-2/+3
| | | | | | | | | | The packaging.install.remove function (a.k.a. the uninstall feature) takes a path argument to allow client code to use custom directories instead of sys.path. The test used to give self.root_dir as path, which corresponds to a prefix option, but prefix is not on sys.path, it’s only the base directory used to compute the stdlib and site-packages directory paths. The test now gives a valid site-packages path to the function.
* Change one name in packaging’s test_uninstall to avoid confusion.Éric Araujo2011-10-061-12/+12
| | | | | | | install_lib may be the name of a module, a command or an option, so I find it clearer to use site_packages to refer to a string object containing the path of the site-packages directory created in a temporary directory during tests.
* Cosmetic fixes for whitespace and a regex in packaging.Éric Araujo2011-10-041-4/+4
| | | | | | The goal of the regex is to catch a (alpha), b (beta), c or rc (release candidate), so the existing pattern puzzled me. Tests were OK before and after the change.
* Add tests for comparing candidate and final versions in packaging (#11841).Éric Araujo2011-10-041-0/+12
| | | | | This used to be buggy; Filip Gruszczyński contributed tests and a code patch but the latter is not needed.
* Squash last tempdir leak in packaging tests.Éric Araujo2011-09-191-0/+2
| | | | Sweet taste of victory! Alexis, you can fix the threads leaks :)
* Final bag of small changes coming from distutils2.Éric Araujo2011-09-195-13/+12
| | | | | | | | | - minor cleanup in Metadata - trigger creation of the sysconfig._CONFIG_VARS dict - home_page is used over home-page: it’s not a compound word, it’s an escaped space Distutils2 is now synchronized with Packaging.
* Branch mergeÉric Araujo2011-09-186-33/+7
|\
| * Packaging cleanup: remove conditionals for < 2.6 support.Éric Araujo2011-09-176-33/+7
| | | | | | | | | | | | | | | | PEP 370 features and sys.dont_write_bytecode are always available in 3.3; the distutils2 backport still has the conditionals. I also renamed an internal misnamed method and fixed a few things (“packaging2” name, stray print, unused import, fd leak).
* | Make a number of small changes to ease the backport to distutils2Éric Araujo2011-09-1815-119/+97
| |
* | Fix fallback base class when tests run without threadingÉric Araujo2011-09-181-1/+1
| |
* | Issue #12765: Fix packaging.test.test_database failures on OS X dueNed Deily2011-09-151-0/+1
|/ | | | | to unwarranted assumption about absolute paths: on OS X /var is a symlink to /private/var. (Also true for /etc and /tmp).
* Fix packaging.database.Distribution.list_distinfo_files (#12785).Éric Araujo2011-09-151-22/+24
| | | | | | | | | | | This method was supposed to return only the file under the dist-info directory, but it actually returned all installed files. The tests didn’t catch this because they were flawed; I updated them. Thanks to Nadeem Vawda and Jeremy Kloth for testing. As a bonus, the removal of os.path.relpath use should also fix the Windows buildbots.
* Remove unneeded --all option of “pysetup list”.Éric Araujo2011-09-121-0/+1
| | | | | | | | | | | | The command without arguments already prints all installed distributions found. In addition, change “releases” for “projects” in the description of the list action. Strictly speaking, one installed distribution satisfies the requirement for a release (i.e. version) of a project, but as currently only one release per project can be installed at a time, the two are somewhat equivalent, and “project” is more understandable in help texts (which call their argument “dist”, by the way..)
* Fix determination of Metadata version in packaging (#8933).Éric Araujo2011-09-101-1/+14
| | | | Original patch by Filip Gruszczyński.
* Consolidate tests for packaging.metadata.Éric Araujo2011-09-103-349/+321
| | | | | | | | | | | | | | | | | New tests were added in test_metadata and old tests inherited from distutils were still in test_dist, so I moved them into test_metadata (except for one which was more at home in test_run) and merged duplicates. I also added some skips to lure contributors <wink>, optimized the Metadata.update method a trifle, and added notes about a number of issues. A note: The tests in test_dist used to dump the Metadata objects to a file in the METADATA format and look for strings in its contents; I updated them to use the mapping API of Metadata instead. For some fields with special writing rules, I have added tests to ensure my conversion did not lose anything.
* Issue #9561: packaging now writes egg-info files using UTF-8Victor Stinner2011-09-051-2/+2
| | | | instead of the locale encoding
* Minor: tweak docstrings and __all__ in packaging.tests.supportÉric Araujo2011-09-011-13/+27
|
* Minor improvement to extensions in setup.cfg: check parent packageÉric Araujo2011-09-011-2/+29
|
* Minor improvement to extensions section in setup.cfg.Éric Araujo2011-09-011-5/+11
| | | | | | The right-hand part in [extension: foo] is now used as the name of the extension module. (I changed the separator from = to : and allowed whitespace to make the sections look nicer.)
* Clean up packaging.util: add __all__, remove some unused functions.Éric Araujo2011-09-011-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | This huge module is the heir of six distutils modules, and contains a number of miscellaneous functions. I have attempted to help readers of the source code with an annoted __all__. Removed or deprecated functions have been removed from the documentation; I’m working on another patch to document the remaining public functions. For the curious: The unzip_file and untar_file were used by (or intended to be used by) “pysetup install path/to/archive.tar.gz”, but the code presently used shutil.unpack_archive and an helper function, so I just deleted them. They’re still in the repository if we need them in the future. The find_packages function is not used anymore but I want to discuss module and package auto-discovery (in “pysetup create”) again before removing it. subst_vars now lives in sysconfig; rfc822_escape is inlined in packaging.metadata. Other functions are for internal use only, or deprecated; I have left them out of __all__ and sprinkled TODO notes for future cleanups.
* Make bdist_* commands respect --skip-build passed to bdist (#10946).Éric Araujo2011-08-291-29/+13
| | | | | | There was already a test for this, but it was complicated and had a subtle bug (custom command objects need to be put in dist.command_obj so that other command objects may see them) that rendered it moot.
* Remove obsolete mentions of the compress program and .Z archives.Éric Araujo2011-08-291-11/+8
| | | | | | Packaging uses the shutil.make_archive function copied from distutils, which does not support compress. There is no test to check that “bdist --format whatever” works, so this slipped by.
* Remove display options (--name, etc.) from the Distribution class.Éric Araujo2011-08-294-7/+7
| | | | | | | | | | | | These options were used to implement “setup.py --name”, “setup.py --version”, etc. which are now handled by the pysetup metadata action or direct parsing of the setup.cfg file. As a side effect, the Distribution class no longer accepts a 'url' key in its *attrs* argument: it has to be 'home-page' to be recognized as a valid metadata field and passed down to the dist.metadata object. I cleaned up some comments, docstrings and code along the way.
* Minor code simplificationÉric Araujo2011-08-251-3/+2
|
* Another (hopefully last) fix for test_packaging on Windws (#12678)Éric Araujo2011-08-251-3/+13
|
* Fix test_packaging on Windows (#12678).Éric Araujo2011-08-242-4/+16
| | | | See the distutils commit message for more detail.
* Try to fix packaging tests using build_ext on Windows (#12678)Éric Araujo2011-08-232-19/+18
|
* Fix test_command_install_dist in shared Python buildsÉric Araujo2011-08-211-0/+1
|
* Factor out the build_ext fixup for shared Python builds.Éric Araujo2011-08-212-22/+29
| | | | I need this to fix the failing test_command_install_dist.
* Remove obsolete codeÉric Araujo2011-08-211-2/+0
|
* Add a simple test for the packaging RECORD file.Éric Araujo2011-08-201-1/+53
| | | | | | | | | The existing test_record is not easily extendable to add script files or extension modules: it collects all files from fake_dists and generates a RECORD file at runtime. I felt more comfortable adding a new test written from scratch more self-contained (just one project with well-defined files) and more stupid (the checksums and sizes are computed once and hard-coded).
* Minor cleanupÉric Araujo2011-08-201-5/+0
| | | | | | - Rename an attribute and create it in initialize_options instead of finalize_options to match the other install_* classes - Remove unnecessary method call in tests
* Add a test for extension modules in the old-style record fileÉric Araujo2011-08-201-1/+24
|
* Rework test_old_record a bit to make the test more exactÉric Araujo2011-08-201-13/+13
| | | | (i.e. to check the files found are what we expect)
* Refactor the copying of xxmodule.c in packaging tests (#12141).Éric Araujo2011-08-202-27/+37
| | | | | | | | | | | 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.
* Restore $HOME after test has run (should fix #12765)Éric Araujo2011-08-191-0/+3
|
* Use our existing drop-in, no-op decorator instead of redefining it.Éric Araujo2011-08-111-6/+2
| | | | Patch by Francisco Martin Brugue.
* Stop trying to write into the stdlib during packaging tests (#12331).Éric Araujo2011-07-311-23/+31
| | | | | | | | | | This prevents tests from failing when run from a Python installed in a read-only directory. The code is a bit uglier; shutil.copytree calls copystat on directories behind our back, so I had to add an os.walk with os.chmod (*and* os.path.join!) calls. shutil, I am disappoint. This changeset is dedicated to the hundreds of neurons that were lost while I was debugging this on an otherwise fine afternoon.
* Minor packaging cleanup.Éric Araujo2011-07-292-6/+6
| | | | | - Use shortcut dist.version instead of going through metadata; - Use %r throughout to display project names and paths.
* test_packaging should clean up after itself (but it doesn't really)Antoine Pitrou2011-07-151-6/+9
|
* Silence 2to3 warnings in packaging testsÉric Araujo2011-07-151-4/+8
|
* Close file handles in a timely manner in packaging.database (#12504).Éric Araujo2011-07-081-2/+0
| | | | | This fixes a bug with the remove (uninstall) feature on Windows. Patch by Thomas Holmes.
* Factor out code used by packaging commands for HTTP requests (#12169).Éric Araujo2011-07-083-32/+31
| | | | | | We now have one function to prepare multipart POST requests, and we use CRLF, as recommended by the HTTP spec (#10150). Initial patch by John Edmonds.
* Issue #9516: Port OS X deployment target tests from distutils to packagingNed Deily2011-06-291-1/+92
| | | | test_command_build_ext.
* Issue #12141: Install copies of template C module file so thatNed Deily2011-06-281-0/+5
| | | | | | test_build_ext of test_distutils and test_command_build_ext of test_packaging are no longer silently skipped when run outside of a build directory.
* packaging: Add the project directory to sys.path to support local setup hooks.Éric Araujo2011-06-191-1/+21
| | | | Original patch by Vinay Sajip on #11637.
* Fix typoÉric Araujo2011-06-191-1/+1
|
* Brange mergeÉric Araujo2011-06-178-110/+96
|\
| * Minor tweaks to packaging tests.Éric Araujo2011-06-173-34/+28
| | | | | | | | | | | | - Move a tearDown method right after setUp - Use assertRaises instead of reinventing it - Skip a test instead of commenting it out, as a reminder
| * Packaging tests: don’t let an internal cache grow indefinitely.Éric Araujo2011-06-172-0/+4
| | | | | | | | | | | | | | | | | | Victor Stinner diagnosed on #12167 that some reference leaks came from util._path_created, a set used for caching; there are two tests that cause additions to this set, so now they clear it in tearDown, avoiding 17 refleaks. (My tests show that it’s necessary to clear the set in only one test, clearing it in both does not stop more refleaks, but there’s no harm in doing it.)