summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_imp.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #18755: Allow imp.load_*() loaders to have get_data() calledBrett Cannon2013-08-231-0/+7
| | | | multiple times.
* issue #18698: ensure importlib.reload() returns the module out of sys.modules.Eric Snow2013-08-151-0/+17
|
* Issue #18706: Fix a test for issue #18681 so it no longer breaks ↵Serhiy Storchaka2013-08-111-2/+3
| | | | test_codeccallbacks*.
* #18681: Fix a NameError in imp.reload() (noticed by Weizhao Li).Ezio Melotti2013-08-101-0/+9
|
* only close non-None filesBenjamin Peterson2013-05-111-1/+2
|
* Fix a test to not use an assertion for something that could beBrett Cannon2013-05-041-1/+2
| | | | legitimately false.
* Issue #15902: Fix imp.load_module() to accept None as a file whenBrett Cannon2013-05-031-0/+15
| | | | | | | trying to load an extension module. While at it, also add a proper unittest.skipIf() guard to another test involving imp.load_dynamic().
* #11420: merge with 3.2.Ezio Melotti2013-03-161-2/+4
|\
| * #11420: make test suite pass with -B/DONTWRITEBYTECODE set. Initial patch ↵Ezio Melotti2013-03-161-3/+5
| | | | | | | | by Thomas Wouters.
* | Issue #15828: Don't try to close a file if imp.find_module() doesn'tBrett Cannon2012-08-311-1/+3
| | | | | | | | return one.
* | Issue #15828: Restore support for C extension modules in imp.load_module()Nick Coghlan2012-08-311-0/+29
| |
* | Issue #15056: imp.cache_from_source() and source_from_cache() raiseBrett Cannon2012-07-091-0/+18
| | | | | | | | | | | | NotimplementedError when sys.implementation.cache_tag is None. Thanks to Pranav Ravichandran for taking an initial stab at the patch.
* | Try to further debug occasional buildbot failureAntoine Pitrou2012-06-231-0/+6
| |
* | Issue #13959: HaveBrett Cannon2012-05-111-6/+13
| | | | | | | | | | | | | | | | | | | | importlib.abc.FileLoader.load_module()/get_filename() and importlib.machinery.ExtensionFileLoader.load_module() have their single argument be optional as the loader's constructor has all the ncessary information. This allows for the deprecation of imp.load_source()/load_compile()/load_package().
* | Change tests for imp.cache_from_source() to follow os.path.join/splitBrett Cannon2012-04-221-43/+32
| | | | | | | | semantics.
* | Issue #14599: Generalize a test for ImportError.path and add supportBrett Cannon2012-04-201-0/+11
| | | | | | | | | | | | | | in Python/dynload_shlibs.c. This should fix the remaining importlib test failure on Windows. Support in AIX and HP-UX will be in a separate checkin.
* | Issue #14633: Simplify imp.find_modue() test after fixes from issueBrett Cannon2012-04-201-4/+2
| | | | | | | | #14629 changed the message.
* | More debug outputAntoine Pitrou2012-02-271-2/+2
| |
* | Improve debugging output for test failureAntoine Pitrou2012-02-271-1/+1
| |
* | Issue #14080: fix sporadic test_imp failure. Patch by Stefan Krah.Antoine Pitrou2012-02-261-0/+1
| |
* | Additional debug info in case of failureAntoine Pitrou2012-02-221-2/+1
| |
* | unload() should be sufficientAntoine Pitrou2012-02-221-2/+2
| |
* | Try to debug sporadic test failuresAntoine Pitrou2012-02-221-2/+5
| |
* | Issue #12451: Add support.create_empty_file()Victor Stinner2011-06-301-2/+1
| | | | | | | | | | | | | | 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).
* | Issue #11919: try to fix test_imp failure on some buildbots.Antoine Pitrou2011-04-251-1/+2
|\ \ | |/
| * Issue #11919: try to fix test_imp failure on some buildbots.Antoine Pitrou2011-04-251-1/+2
| |
* | Correctly merging #9319 into 3.3?Jesus Cea2011-04-251-0/+4
|\ \ | |/
| * Issue #9319: Fix the unit testVictor Stinner2011-04-221-1/+2
| |
| * Issue #9319: Fix a crash on parsing a Python source code without encodingVictor Stinner2011-04-221-0/+3
| | | | | | | | | | cookie and not valid in UTF-8: use "<file>" as the filename instead of reading from NULL.
* | Issue #9319: Include the filename in "Non-UTF8 code ..." syntax error.Victor Stinner2011-04-041-0/+6
| |
* | Fix imp.cache_from_source() if the directory name contains a dotVictor Stinner2011-03-141-0/+4
|/ | | | | If the directory name contains a dot but not the filename, don't strip at the dot.
* #9424: Replace deprecated assert* methods in the Python test suite.Ezio Melotti2010-11-201-1/+1
|
* Move test_imp over to file context managers.Brett Cannon2010-10-291-23/+23
|
* Issue #9308: Removed redundant coding cookies. Added tests forAlexander Belopolsky2010-10-151-9/+23
| | | | | importing encoded modules that do not depend on specific stdlib modules being encoded in a certain way.
* test_imp: getfilesystemencoding() cannot be None anymoreVictor Stinner2010-09-291-1/+0
| | | | And the codec name is normalized.
* Fix a typo: TESTFN_UNENCODEABLE => TESTFN_UNENCODABLEVictor Stinner2010-08-131-2/+2
|
* Issue #9425: NullImporter constructor is fully unicode compliantVictor Stinner2010-08-131-0/+13
| | | | | | * On non-Windows OSes: the constructor accepts bytes filenames and use surrogateescape for unicode filenames * On Windows: use GetFileAttributesW() instead of GetFileAttributesA()
* pydoc still has a silly encodingBenjamin Peterson2010-07-051-1/+1
|
* PEP 3147Barry Warsaw2010-04-171-2/+125
|
* TypoFlorent Xicluna2010-03-201-1/+1
|
* #8133: Use appropriate Unicode decomposition on MacOS X platform.Florent Xicluna2010-03-201-1/+8
|
* take into account shebang line changeBenjamin Peterson2010-03-111-1/+1
|
* The test was failing because the curdir was missing from sys.path. This ↵Ezio Melotti2010-03-061-0/+4
| | | | should fix the problem.
* Cleanup and minor fixes.Ezio Melotti2010-03-061-17/+13
|
* sys.getdefaultencoding() can return None.Ezio Melotti2010-03-051-0/+1
|
* r78689 enabled the test on more platforms but the buildbot did not like it. ↵Ezio Melotti2010-03-051-6/+5
| | | | Using the filesystem encoding might work better. Also see #5604.
* This fixes a missing .lower() on the encoding name, a wrong byte undecodable ↵Ezio Melotti2010-03-051-42/+45
| | | | by UTF-8, a wrong variable name, hopefully some windows buildbot on 3.x and adds a proper skip. It might break other things though.
* Note that a number of the changes listed below were not applicable to the ↵Nick Coghlan2009-10-181-7/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Py3k branch, and hence the corresponding files are unchanged in this checkin. This checkin is also the first time the environment checking in regrtest has been forward ported to the Py3k branch. This checkin causes test_xmlrpc to fail - see issue 7165 (it's a bug in the 3.x version of xmlrpc.server) I am also getting a failure in test_telnetlib, but it isn't clear yet if that is due to these changes. Recorded merge of revisions 75400-75401,75404,75406,75414,75416,75422,75425-75428,75435,75439,75441-75444,75447-75449,75451-75453,75455-75458,75460-75469,75471-75473,75475-75477,75479-75481,75483,75486-75489 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75400 | r.david.murray | 2009-10-14 23:58:07 +1000 (Wed, 14 Oct 2009) | 6 lines Enhanced Issue 7058 patch, which will not be backported. Refactors the code, adds checks for stdin/out/err, cwd, and sys.path, and adds a new section in the summary for tests that modify the environment (thanks to Ezio Melotti for that suggestion). ........ r75453 | nick.coghlan | 2009-10-17 16:33:05 +1000 (Sat, 17 Oct 2009) | 1 line Correctly restore sys.stdout in test_descr ........ r75456 | nick.coghlan | 2009-10-17 17:30:40 +1000 (Sat, 17 Oct 2009) | 1 line Enhancement to the new environment checking code to print the changed items under -vv. Also includes a small tweak to allow underscores in the names of resources. ........ r75457 | nick.coghlan | 2009-10-17 17:34:27 +1000 (Sat, 17 Oct 2009) | 1 line Formatting tweak so that before and after values are vertically aligned ........ r75458 | nick.coghlan | 2009-10-17 18:21:21 +1000 (Sat, 17 Oct 2009) | 1 line Check and revert expected sys.path alterations ........ r75461 | nick.coghlan | 2009-10-18 00:40:54 +1000 (Sun, 18 Oct 2009) | 1 line Restore original sys.path when running TTK tests ........ r75462 | nick.coghlan | 2009-10-18 01:09:41 +1000 (Sun, 18 Oct 2009) | 1 line Don't invoke reload(sys) and use StringIO objects instead of real files to capture stdin and stdout when needed (ensures all sys attributes remain unmodified after test_xmlrpc runs) ........ r75463 | nick.coghlan | 2009-10-18 01:23:08 +1000 (Sun, 18 Oct 2009) | 1 line Revert changes made to environment in test_httpservers ........ r75465 | nick.coghlan | 2009-10-18 01:45:52 +1000 (Sun, 18 Oct 2009) | 1 line Move restoration of the os.environ object into the context manager where it belongs ........ r75466 | nick.coghlan | 2009-10-18 01:48:16 +1000 (Sun, 18 Oct 2009) | 1 line Also check and restore identity of sys.path, sys.argv and os.environ rather than just their values (this picked up a few more misbehaving tests) ........ r75467 | nick.coghlan | 2009-10-18 01:57:42 +1000 (Sun, 18 Oct 2009) | 1 line Avoid replacing existing modules and sys.path in import tests ........ r75468 | nick.coghlan | 2009-10-18 02:19:51 +1000 (Sun, 18 Oct 2009) | 1 line Don't replace sys.path in test_site ........ r75481 | nick.coghlan | 2009-10-18 15:38:48 +1000 (Sun, 18 Oct 2009) | 1 line Using CleanImport to revert a reload of the os module doesn't work due to function registrations in copy_reg. The perils of reloading modules even for tests... ........ r75486 | nick.coghlan | 2009-10-18 20:29:10 +1000 (Sun, 18 Oct 2009) | 1 line Silence a deprecation warning by using the appropriate replacement construct ........ r75489 | nick.coghlan | 2009-10-18 20:56:21 +1000 (Sun, 18 Oct 2009) | 1 line Restore sys.path in test_tk ........
* convert old fail* assertions to assert*Benjamin Peterson2009-06-301-1/+1
|
* Issue #5604: non-ASCII characters in module name passed toGuido van Rossum2009-03-301-0/+71
| | | | | | | | imp.find_module() were converted to UTF-8 while the path is converted to the default filesystem encoding, causing nonsense. Thanks to Andrew Svetlov. (This time to the right branch. Will block duplicate merge to 3.0.2.)