summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_import.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #22390: Remove files created by testsVictor Stinner2014-10-051-0/+1
|
* Issue #19593: Use specific asserts in importlib tests.Serhiy Storchaka2014-07-071-3/+3
|
* Implement PEP 451 (ModuleSpec).Eric Snow2013-11-221-4/+10
|
* remove dead importBrett Cannon2013-11-081-1/+0
|
* Close #18754: Run Python child processes in isolated more in the test suite.Victor Stinner2013-10-121-1/+2
|
* test_import.test_module_with_large_stack(): unload the test moduleVictor Stinner2013-10-061-1/+9
| | | | | Ensure that the module is unloaded to be able to run the test more than once, and to not leak memory.
* merge 3.3 (#19122)Benjamin Peterson2013-09-291-11/+0
|\
| * remove duplicate test from test_import (closes #19122)Benjamin Peterson2013-09-291-11/+0
| |
* | Close #11619: The parser and the import machinery do not encode UnicodeVictor Stinner2013-08-261-1/+9
| | | | | | | | filenames anymore on Windows.
* | Make test_import more robust and stop using assertRaisesRegexp().Brett Cannon2013-08-231-2/+3
| |
* | Issue #18342: Use the repr of a module name for ``from ... importBrett Cannon2013-07-121-0/+8
| | | | | | | | | | | | | | | | ...`` when an ImportError occurs. Other cases had already been switched over to using the repr. Thanks to Tomasz Maćkowiak for the patch.
* | merge for issue #18351.Brett Cannon2013-07-061-0/+36
|\ \ | |/
| * Issue #18351: Fix various issues withBrett Cannon2013-07-061-1/+37
| | | | | | | | | | | | | | | | | | importlib._bootstrap._get_sourcefile(). Thanks to its only use by the C API, it was never properly tested until now. Thanks to Neal Norwitz for discovering the bug and Madison May for the patch.
* | Move test_import over to unittest.main().Brett Cannon2013-07-041-14/+2
| |
* | Issue #15767: back out 8a0ed9f63c6e, finishing the removal ofBrett Cannon2013-07-041-11/+14
| | | | | | | | ModuleNotFoundError.
* | Issue #17177: The imp module is pending deprecation.Brett Cannon2013-06-161-16/+16
| | | | | | | | | | | | To make sure there is no issue with code that is both Python 2 and 3 compatible, there are no plans to remove the module any sooner than Python 4 (unless the community moves to Python 3 solidly before then).
* | Issue #17907: touch up the code for imp.new_module().Brett Cannon2013-06-151-1/+0
| |
* | Issue #15767: Introduce ModuleNotFoundError, a subclass ofBrett Cannon2013-06-121-14/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ImportError. The exception is raised by import when a module could not be found. Technically this is defined as no viable loader could be found for the specified module. This includes ``from ... import`` statements so that the module usage is consistent for all situations where import couldn't find what was requested. This should allow for the common idiom of:: try: import something except ImportError: pass to be updated to using ModuleNotFoundError and not accidentally mask ImportError messages that should propagate (e.g. issues with a loader). This work was driven by the fact that the ``from ... import`` statement needed to be able to tell the difference between an ImportError that simply couldn't find a module (and thus silence the exception so that ceval can raise it) and an ImportError that represented an actual problem.
* | Issue #7732: Move an imp.find_module test from test_import toBrett Cannon2013-06-071-10/+0
|/ | | | test_imp.
* raise an ImportError (rather than fatal) when __import__ is not found in ↵Benjamin Peterson2013-04-291-0/+7
| | | | __builtins__ (closes #17867)
* Close #17731: Clean up properly in test_importNick Coghlan2013-04-151-0/+3
|
* #11420: merge with 3.2.Ezio Melotti2013-03-161-0/+13
|\
| * #11420: make test suite pass with -B/DONTWRITEBYTECODE set. Initial patch ↵Ezio Melotti2013-03-161-0/+13
| | | | | | | | by Thomas Wouters.
| * Fix broken test and replace redundant generator with a tupleNick Coghlan2012-10-191-9/+13
| |
| * Issue #6074: Actually delete the source file in the test as intendedNick Coghlan2012-10-191-1/+1
| |
| * Issue #6074: Forward port Windows read-only source file fix from 2.7Nick Coghlan2012-10-191-5/+51
| |
* | Remove unused importNick Coghlan2012-10-191-1/+0
| |
* | Issue #6074: Apply an appropriate fix for importlib based importsNick Coghlan2012-10-191-49/+107
| |
* | merge 3.2Benjamin Peterson2012-09-251-1/+1
|\ \ | |/
| * use modern conditional syntaxBenjamin Peterson2012-09-251-1/+1
| |
* | Issue #15828: Restore support for C extension modules in imp.load_module()Nick Coghlan2012-08-311-19/+0
| |
* | Close #2501: Permission bits are once again correctly copied from the source ↵Nick Coghlan2012-08-241-1/+24
| | | | | | | | file to the cached bytecode file. Test by Eric Snow.
* | Issue #15715: Ignore failed imports triggered by the use of fromlist.Brett Cannon2012-08-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | When the fromlist argument is specified for __import__() and the attribute doesn't already exist, an import is attempted. If that fails (e.g. module doesn't exist), the ImportError will now be silenced (for backwards-compatibility). This *does not* affect ``from ... import ...`` statements. Thanks to Eric Snow for the patch and Simon Feltman for reporting the regression.
* | Issue #15425: Don't rely on the assumption that the current working ↵Nick Coghlan2012-07-311-7/+5
| | | | | | | | directory is on sys.path (this will hopefully appease the XP buildbots)
* | Close #15486: Simplify the mechanism used to remove importlib frames from ↵Nick Coghlan2012-07-311-2/+4
| | | | | | | | tracebacks when they just introduce irrelevant noise
* | Close #15425: Eliminate more importlib related traceback noiseNick Coghlan2012-07-291-0/+68
| |
* | Restored test by specifying that the symlink links to a target (currently ↵Jason R. Coombs2012-07-261-3/+2
| | | | | | | | required for Windows symlinks). See issue15093 for details.
* | Fix an import from the importlib.test move.Brett Cannon2012-07-201-1/+1
| |
* | Issue #15091: Call importlib.invalidate_caches() and reactivate a testBrett Cannon2012-07-201-27/+15
| | | | | | | | of importing a symlinked package.
* | Running the importlib tests from test_import is redundant as there isBrett Cannon2012-07-201-13/+6
| | | | | | | | no difference anymore between __import__ and importlib.__import__.
* | Close #15386: There was a loophole that meant importlib.machinery and imp ↵Nick Coghlan2012-07-201-1/+11
| | | | | | | | would sometimes reference an uninitialised copy of importlib._bootstrap
* | Issue #15338: skip test_UNC_path when the current user doesn't have enough ↵Antoine Pitrou2012-07-131-11/+14
|\ \ | |/ | | | | permissions to access the path.
| * Issue #15338: skip test_UNC_path when the current user doesn't have enough ↵Antoine Pitrou2012-07-131-0/+7
| | | | | | | | permissions to access the path.
* | For diagnosis, try to list the directory firstAntoine Pitrou2012-07-121-0/+1
| |
* | Small improvements to test_unc_pathAntoine Pitrou2012-07-121-7/+8
| |
* | Try to fix or diagnose buildbot failuresAntoine Pitrou2012-07-121-1/+6
| |
* | Fix test failure under WindowsAntoine Pitrou2012-07-081-1/+1
| |
* | Issue #15110: Fix the tracebacks generated by "import xxx" to not show the ↵Antoine Pitrou2012-07-081-0/+93
| | | | | | | | importlib stack frames.
* | Properly cleanup pep3147 modules in test_importAntoine Pitrou2012-06-231-4/+4
| |
* | Prefer assertEqual to simply assert per recommendation in issue6727.Jason R. Coombs2012-06-201-3/+8
| | | | | | | | Clarified comment on disabled code to reference issue15093.