summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_import.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #14043: Speed up importlib's _FileFinder by at least 8x, and add a new ↵Antoine Pitrou2012-02-201-0/+8
| | | | | | importlib.invalidate_caches() function. importlib is now often faster than imp.find_module() at finding modules.
* Port import fixes from 2.7.Antoine Pitrou2012-01-251-1/+1
|\
| * Port import fixes from 2.7.Antoine Pitrou2012-01-251-1/+1
| |
* | Port remaining test fixes, and fix test_importlib too.Antoine Pitrou2012-01-251-8/+21
|\ \ | |/
| * Port remaining test fixes, and fix test_importlib too.Antoine Pitrou2012-01-251-0/+5
| |
| * Make test work under 32-bit systems, and when invoked through ↵Antoine Pitrou2012-01-251-8/+16
| | | | | | | | | | | | Lib/test/regrtest.py (rather than `-m test.regrtest`)
* | Issue #11235: Fix OverflowError when trying to import a source file whose ↵Antoine Pitrou2012-01-241-0/+12
|\ \ | |/ | | | | modification time doesn't fit in a 32-bit timestamp.
| * Issue #11235: Fix OverflowError when trying to import a source file whose ↵Antoine Pitrou2012-01-241-0/+12
| | | | | | | | modification time doesn't fit in a 32-bit timestamp.
* | Issue #13645: pyc files now contain the size of the corresponding sourceAntoine Pitrou2012-01-131-1/+11
| | | | | | | | | | code, to avoid timestamp collisions (especially on filesystems with a low timestamp resolution) when checking for freshness of the bytecode.
* | Issue #13645: fix test_import failure when run immediately after test_coding.Antoine Pitrou2011-12-211-1/+2
|\ \ | |/
| * Issue #13645: fix test_import failure when run immediately after test_coding.Antoine Pitrou2011-12-211-1/+2
| |
* | Issue #13303: Fix bytecode file default permission.Charles-François Natali2011-11-101-10/+7
| |
* | Back out changeset b6336ba796d4 until fix for #13303.Charles-François Natali2011-11-081-3/+4
| |
* | test_import: test_execute_bit_not_copied() was actually a no-op: enable it.Charles-François Natali2011-11-081-4/+3
|\ \ | |/
| * test_import: test_execute_bit_not_copied() was actually a no-op: fix it.Charles-François Natali2011-11-081-4/+3
| |
* | os.geteuid() may not be available...Charles-François Natali2011-10-041-1/+1
|\ \ | |/
| * os.geteuid() may not be available...Charles-François Natali2011-10-041-1/+1
| |
* | Issue #11956: Always skip test_import.test_unwritable_directory when run asCharles-François Natali2011-10-041-2/+2
|\ \ | |/ | | | | root, since the semantics varies across Unix variants.
| * Issue #11956: Always skip test_import.test_unwritable_directory when run asCharles-François Natali2011-10-041-2/+2
| | | | | | | | root, since the semantics varies across Unix variants.
* | Issue #11956: Skip test_import.test_unwritable_directory on FreeBSD when run asCharles-François Natali2011-10-041-0/+3
|\ \ | |/ | | | | root (directory permissions are ignored).
| * Issue #11956: Skip test_import.test_unwritable_directory on FreeBSD when run asCharles-François Natali2011-10-041-0/+3
| | | | | | | | root (directory permissions are ignored).
* | Merge 3.2: Issue #7732: Don't open a directory as a file anymore whileVictor Stinner2011-09-231-0/+9
|\ \ | |/ | | | | | | importing a module. Ignore the direcotry if its name matchs the module name (e.g. "__init__.py") and raise a ImportError instead.
| * Issue #7732: Don't open a directory as a file anymore while importing aVictor Stinner2011-09-231-0/+9
| | | | | | | | | | module. Ignore the direcotry if its name matchs the module name (e.g. "__init__.py") and raise a ImportError instead.
* | Issue #12451: Add support.create_empty_file()Victor Stinner2011-06-301-2/+2
| | | | | | | | | | | | | | We don't need to create a temporary buffered binary or text file object just to create an empty file. Replace also os.fdopen(handle).close() by os.close(handle).
* | Try to make test_import a bit more robustAntoine Pitrou2011-03-211-0/+3
|\ \ | |/
| * Try to make test_import a bit more robustAntoine Pitrou2011-03-211-0/+3
| |
* | Remove an overly specific exception message test.Brett Cannon2011-03-171-2/+0
|/
* #4236: avoid possible Fatal Error when import is called from __del__R. David Murray2010-12-141-0/+13
| | | | Patch by Simon Cross, crasher test code by Martin von Löwis.
* close open file from find_module()Benjamin Peterson2010-10-301-0/+1
|
* condenseBenjamin Peterson2010-10-301-5/+1
|
* kill pointless function importsBenjamin Peterson2010-10-301-1/+0
|
* remove useless assignmentBenjamin Peterson2010-10-301-1/+1
|
* Better check for "any optimize option given".Georg Brandl2010-10-141-1/+1
|
* #9964: fix running test_import under -O or -OO.Georg Brandl2010-10-141-1/+2
|
* I get it wrong in r84097: s/relative/absolute/Florent Xicluna2010-08-161-1/+2
|
* Use test.support and unittest features. Fix duplicated test (bad merge in ↵Florent Xicluna2010-08-161-26/+9
| | | | r79033). Fix comment for issue #7902.
* Issue #9425: skip tests if a filename is not encodableVictor Stinner2010-08-071-0/+5
|
* Stop shadowing a test class.Brett Cannon2010-07-231-2/+2
|
* Explicitly test relative imports by reusing importlib tests.Brett Cannon2010-07-231-1/+14
| | | | Closes issue 8392. Thanks Virgil Dupras for the initial patch.
* Make test_import a little bit more robust for cleaning up after itself in theBrett Cannon2010-07-031-6/+8
| | | | face of a failure.
* Merged revisions 81380 via svnmerge fromBenjamin Peterson2010-06-271-0/+11
| | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81380 | brett.cannon | 2010-05-20 13:37:55 -0500 (Thu, 20 May 2010) | 8 lines Turned out that if you used explicit relative import syntax (e.g. from .os import sep) and it failed, import would still try the implicit relative import semantics of an absolute import (from os import sep). That's not right, so when level is negative, only do explicit relative import semantics. Fixes issue #7902. Thanks to Meador Inge for the patch. ........
* Repair test failure. Bug 8727.Barry Warsaw2010-05-181-1/+0
|
* Make test_module_with_large_stack as an expected failure because of a change inBrett Cannon2010-05-151-0/+1
| | | | | importlib that is causing it to fail. Work to fix it is being tracked in issue 8727.
* Fix a comment to state the right thing.Brett Cannon2010-05-151-4/+3
|
* A test was not guaranteeing cleanup in the face of an exception.Brett Cannon2010-05-151-7/+8
|
* PEP 3147Barry Warsaw2010-04-171-30/+176
|
* Merged revisions 79030-79032 via svnmerge fromFlorent Xicluna2010-03-171-50/+59
| | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79030 | florent.xicluna | 2010-03-17 20:05:04 +0100 (mer, 17 mar 2010) | 2 lines Cleanup in test_import and test_coding. ........ r79031 | florent.xicluna | 2010-03-17 20:15:56 +0100 (mer, 17 mar 2010) | 2 lines Cleanup some test cases using check_warnings and check_py3k_warnings. ........ r79032 | florent.xicluna | 2010-03-17 21:05:11 +0100 (mer, 17 mar 2010) | 2 lines Fix and check cgi module deprecation warnings. Revert an unwanted rename in test_import. ........
* Add tests for overriding and shadowing __import__; these are a useful ↵Collin Winter2010-03-171-2/+24
| | | | tripwire for an incoming JIT optimization.
* Merged revisions 79016 via svnmerge fromCollin Winter2010-03-171-54/+59
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79016 | collin.winter | 2010-03-16 19:40:12 -0700 (Tue, 16 Mar 2010) | 1 line Style cleanup in test_import. ........
* use assert[Not]In where appropriateBenjamin Peterson2010-01-191-2/+2
| | | | A patch from Dave Malcolm.