summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_import.py
Commit message (Collapse)AuthorAgeFilesLines
* Merged revisions 73870,73879,73899-73900,73905-73906 via svnmerge fromR. David Murray2009-07-191-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r73870 | r.david.murray | 2009-07-06 21:06:13 -0400 (Mon, 06 Jul 2009) | 5 lines Issue 6070: when creating a compiled file, after copying the mode bits, on posix zap the execute bit in case it was set on the .py file, since the compiled files are not directly executable on posix. Patch by Marco N. ........ r73879 | r.david.murray | 2009-07-07 05:54:16 -0400 (Tue, 07 Jul 2009) | 3 lines Update issue 6070 patch to match the patch that was actually tested on Windows. ........ r73899 | r.david.murray | 2009-07-08 21:43:41 -0400 (Wed, 08 Jul 2009) | 3 lines Conditionalize test cleanup code to eliminate traceback, which will hopefully reveal the real problem. ........ r73900 | r.david.murray | 2009-07-08 22:06:17 -0400 (Wed, 08 Jul 2009) | 2 lines Make test work with -O. ........ r73905 | r.david.murray | 2009-07-09 09:55:44 -0400 (Thu, 09 Jul 2009) | 3 lines Specify umask in execute bit test to get consistent results and make sure we test resetting all three execute bits. ........ r73906 | r.david.murray | 2009-07-09 11:35:33 -0400 (Thu, 09 Jul 2009) | 5 lines Curdir needs to be in the path for the test to work on all buildbots. (I copied this from another import test, but currently this will fail if TESTFN ends up in /tmp...see issue 2609). ........
* Merged revisions ↵Georg Brandl2009-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 68292,68344,68361,68378,68424,68426,68429-68430,68450,68457,68480-68481,68493,68495,68499,68501,68512,68514-68515 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r68292 | skip.montanaro | 2009-01-04 11:36:58 +0100 (So, 04 Jan 2009) | 3 lines If user configures --without-gcc give preference to $CC instead of blindly assuming the compiler will be "cc". ........ r68344 | marc-andre.lemburg | 2009-01-05 20:43:35 +0100 (Mo, 05 Jan 2009) | 7 lines Fix #4846 (Py_UNICODE_ISSPACE causes linker error) by moving the declaration into the extern "C" section. Add a few more comments and apply some minor edits to make the file contents fit the original structure again. ........ r68361 | antoine.pitrou | 2009-01-06 19:34:08 +0100 (Di, 06 Jan 2009) | 3 lines Use shutil.rmtree rather than os.rmdir. ........ r68378 | mark.dickinson | 2009-01-07 18:48:33 +0100 (Mi, 07 Jan 2009) | 2 lines Issue #4869: clarify documentation for random.expovariate. ........ r68424 | benjamin.peterson | 2009-01-09 03:53:35 +0100 (Fr, 09 Jan 2009) | 1 line specify what -3 warnings are about ........ r68426 | benjamin.peterson | 2009-01-09 04:03:05 +0100 (Fr, 09 Jan 2009) | 1 line fix spelling ........ r68429 | benjamin.peterson | 2009-01-09 04:05:14 +0100 (Fr, 09 Jan 2009) | 1 line add -3 to manpage ........ r68430 | benjamin.peterson | 2009-01-09 04:07:27 +0100 (Fr, 09 Jan 2009) | 1 line be more specific in -3 option help ........ r68450 | jeffrey.yasskin | 2009-01-09 17:47:07 +0100 (Fr, 09 Jan 2009) | 3 lines Fix issue 4884, preventing a crash in the socket code when python is compiled with llvm-gcc and run with a glibc <2.10. ........ r68457 | kristjan.jonsson | 2009-01-09 21:10:59 +0100 (Fr, 09 Jan 2009) | 1 line Issue 3677: Fix import from UNC paths on Windows. ........ r68480 | vinay.sajip | 2009-01-10 14:38:04 +0100 (Sa, 10 Jan 2009) | 1 line Minor documentation changes cross-referencing NullHandler to the documentation on configuring logging in a library. ........ r68481 | vinay.sajip | 2009-01-10 14:42:04 +0100 (Sa, 10 Jan 2009) | 1 line Corrected an incorrect self-reference. ........ r68493 | benjamin.peterson | 2009-01-10 18:18:55 +0100 (Sa, 10 Jan 2009) | 1 line rewrite verbose conditionals ........ r68495 | benjamin.peterson | 2009-01-10 18:36:44 +0100 (Sa, 10 Jan 2009) | 1 line tp_iter only exists with Py_TPFLAGS_HAVE_ITER #4901 ........ r68499 | mark.dickinson | 2009-01-10 20:14:55 +0100 (Sa, 10 Jan 2009) | 2 lines Remove an unnecessary check from test_decimal. ........ r68501 | vinay.sajip | 2009-01-10 20:22:57 +0100 (Sa, 10 Jan 2009) | 1 line Corrected minor typo and added .currentmodule directives to fix missing cross-references. ........ r68512 | benjamin.peterson | 2009-01-10 23:42:10 +0100 (Sa, 10 Jan 2009) | 1 line make tests fail if they can't be imported ........ r68514 | benjamin.peterson | 2009-01-11 00:41:59 +0100 (So, 11 Jan 2009) | 1 line move seealso to a more appropiate place ........ r68515 | benjamin.peterson | 2009-01-11 00:49:08 +0100 (So, 11 Jan 2009) | 1 line macos 9 isn't supported ........
* Merged revisions 68360 via svnmerge fromAntoine Pitrou2009-01-061-1/+93
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r68360 | antoine.pitrou | 2009-01-06 19:10:47 +0100 (mar., 06 janv. 2009) | 7 lines Issue #1180193: When importing a module from a .pyc (or .pyo) file with an existing .py counterpart, override the co_filename attributes of all code objects if the original filename is obsolete (which can happen if the file has been renamed, moved, or if it is accessed through different paths). Patch by Ziga Seilnacht and Jean-Paul Calderone. ........
* Issue #3781: Final cleanup of warnings.catch_warnings and its usage in the ↵Nick Coghlan2008-09-111-7/+7
| | | | test suite. Closes issue w.r.t. 2.6 (R: Brett Cannon)
* warnings.catch_warnings() now returns a list or None instead of the customBrett Cannon2008-09-091-8/+8
| | | | | | | | WarningsRecorder object. This makes the API simpler to use as no special object must be learned. Closes issue 3781. Review by Benjamin Peterson.
* Fix issue 3221 by emitting a RuntimeWarning instead of raising SystemError ↵Nick Coghlan2008-07-131-3/+33
| | | | when the parent module can't be found during an absolute import (likely due to non-PEP 361 aware code which sets a module level __package__ attribute)
* Allow test_import to work when it is invoked directlyBenjamin Peterson2008-04-251-0/+2
|
* Import relimport using a relative import.Martin v. Löwis2008-03-191-1/+1
|
* Issue #2400: Allow relative imports to "import *".Martin v. Löwis2008-03-191-1/+13
|
* Fixed #1776. __import__() no longer imports modules by file nameChristian Heimes2008-01-091-1/+11
|
* Removed non ASCII text from test as requested by Guido. Sorry :/Christian Heimes2007-11-011-20/+2
|
* Backport of import tests for bug http://bugs.python.org/issue1293 and bug ↵Christian Heimes2007-11-011-2/+43
| | | | http://bugs.python.org/issue1342
* Remove test.test_support.guard_warnings_filter.Brett Cannon2007-08-141-2/+2
| | | | | | | | test.test_support.catch_warning is more full-featured and provides the same functionality. Since guard_warnings_filter was added in 2.6 there is no backwards-compatibility issues.
* Whitespace normalization.Tim Peters2007-03-121-2/+2
|
* Bug #742342: make Python stop segfaulting on infinitely-recursive reload()s. ↵Collin Winter2007-03-121-0/+10
| | | | | | Fixed by patch #922167. Will backport.
* Add test.test_support.guard_warnings_filter . This function returns a contextBrett Cannon2006-12-131-7/+4
| | | | | manager that protects warnings.filter from being modified once the context is exited.
* Whitespace normalization.Tim Peters2006-10-181-2/+2
|
* Convert test_import to unittest.Georg Brandl2006-09-301-200/+197
|
* - Add new Warning class, ImportWarningThomas Wouters2006-04-271-0/+17
| | | | | | | | | | | | | | - Warn-raise ImportWarning when importing would have picked up a directory as package, if only it'd had an __init__.py. This swaps two tests (for case-ness and __init__-ness), but case-test is not really more expensive, and it's not in a speed-critical section. - Test for the new warning by importing a common non-package directory on sys.path: site-packages - In regrtest.py, silence warnings generated by the build-environment because Modules/ (which is added to sys.path for Setup-created modules) has 'zlib' and '_ctypes' directories without __init__.py's.
* Use absolute importsNeal Norwitz2006-04-031-1/+1
|
* Merge ast-branch to headJeremy Hylton2005-10-201-0/+13
| | | | | | | | | | This change implements a new bytecode compiler, based on a transformation of the parse tree to an abstract syntax defined in Parser/Python.asdl. The compiler implementation is not complete, but it is in stable enough shape to run the entire test suite excepting two disabled tests.
* New tests:Tim Peters2004-08-021-0/+84
| | | | | | | | | | test_failing_import_sticks -- if an import raises an exception, ensure that trying to import it again continues raising exceptions test_failing_reload -- if a module loads OK, but a reload raises an exception, ensure that the module is still in sys.modules, and that its __dict__ reflects as much of the reload attempt as succeeded. That doesn't seem like sane semantics, but it is backward-compatible semantics <wink>.
* Patch #734231: Update RiscOS support. In particular, correctMartin v. Löwis2003-05-101-3/+3
| | | | riscospath.extsep, and use os.extsep throughout.
* Get rid of relative imports in all unittests. Now anything thatBarry Warsaw2002-07-231-1/+1
| | | | | | | | | | | imports e.g. test_support must do so using an absolute package name such as "import test.test_support" or "from test import test_support". This also updates the README in Lib/test, and gets rid of the duplicate data dirctory in Lib/test/data (replaced by Lib/email/test/data). Now Tim and Jack can have at it. :)
* Got rid of special case for Macintosh realloc slowdown: Tim fixed the problem.Jack Jansen2002-07-081-2/+1
|
* Disable the test for importing very long lists for MacPython: it triggersJack Jansen2002-06-201-1/+2
| | | | | an out-of-memory condition (and a hang on OSX). Filed a bug report (#571845) to make sure this is eventually fixed.
* test_module_with_large_stack(): This failed when Python was run with -O,Tim Peters2002-06-151-2/+5
| | | | | trying to delete a .pyc file that didn't exist (it needed to delete .pyo then).
* test_module_with_large_stack(): This failed on Windows, for the wrongTim Peters2002-06-151-1/+1
| | | | reason <wink>: can't unlink an open file on Windows.
* Fix SF bug # 561858 Assertion with very long listsNeal Norwitz2002-06-141-0/+31
| | | | | Write 4 bytes for co_stacksize, etc. to prevent writing out bad .pyc files which can cause a crash when read back in.
* Verify that the imp can find and load .py files.Jeremy Hylton2002-05-301-0/+5
|
* SF patch #474590 -- RISC OS supportGuido van Rossum2001-10-241-3/+3
|
* Rip the import repr truncation test out of here and put it in test_repr.pyBarry Warsaw2001-08-241-35/+0
|
* Added a test for module repr truncation when the package name isBarry Warsaw2001-08-161-0/+35
| | | | really long. Closes SF bug #437984.
* Derived from SF patch #446899 Permit import of .pyw under Windows, fromTim Peters2001-08-041-39/+46
| | | | David Bolen.
* s/endswith/startswith/Tim Peters2001-08-011-1/+1
|
* Rewritten version of Finn Bock's SF patch #446907 (Allow jython toTim Peters2001-08-011-1/+4
| | | | complete test_import).
* SF bug #422177: Results from .pyc differs from .pyTim Peters2001-05-081-0/+3
| | | | | | | | Store floats and doubles to full precision in marshal. Test that floats read from .pyc/.pyo closely match those read from .py. Declare PyFloat_AsString() in floatobject header file. Add new PyFloat_AsReprString() API function. Document the functions declared in floatobject.h.
* Addrf simple test that import is case-sensitive.Tim Peters2001-03-211-1/+10
|
* Insert the current directory to the front of sys.path -- and remove itGuido van Rossum2000-10-241-0/+5
| | | | | | | | at the end. This fixes a problem where python Lib/test/test_import.py failed while "make test" succeeded.
* Adding Jeremy's new test_import (SF patch 101709).Tim Peters2000-10-061-0/+44