Commit Graph

69 Commits

Author SHA1 Message Date
doko@ubuntu.com 9574355ff3 - Issue #21223: Pass test_site/test_startup_imports when some of the extensions
are built as builtins.
2014-04-15 20:37:54 +02:00
Ned Deily 944d597faa Issue #20939: remove stray character from comment 2014-03-26 23:43:26 -07:00
Ned Deily 5a507f0f05 Issue #20939: Use www.example.com instead of www.python.org to avoid test
failures when ssl is not present.
2014-03-26 23:31:39 -07:00
Zachary Ware 63321b4978 Issue #19828: Merge with 3.3 2013-12-11 17:01:21 -06:00
Zachary Ware 36193e73b8 Issue #19828: Fixed test_site when the whole suite is run with -S.
Also, cleaned up an unused import.
2013-12-11 16:59:44 -06:00
Zachary Ware 101d9e7250 Issue 19572: More silently skipped tests explicitly skipped. 2013-12-08 00:44:27 -06:00
Zachary Ware 9fe6d86709 Issue 19572: More silently skipped tests explicitly skipped. 2013-12-08 00:20:35 -06:00
Georg Brandl 78abc9dcc2 Skip overzealous test for existence of the online license.html for pre-release versions. 2013-10-27 09:41:57 +01:00
Georg Brandl 186729e812 merge with 3.3 2013-10-27 09:54:53 +01:00
Antoine Pitrou dfea31254b Issue #19360: fix test_site when Python is installed into $HOME/.local 2013-10-23 22:03:45 +02:00
Antoine Pitrou a1782e1be8 Issue #19360: fix test_site when Python is installed into $HOME/.local 2013-10-23 22:03:22 +02:00
Ned Deily b795aa8547 Issue #19275: Fix test_site failure on OS X due to typo. 2013-10-17 15:21:40 -07:00
Christian Heimes 86823a52fc Issue #19275: Fix test_site on AMD64 Snow Leopard 2013-10-17 13:40:00 +02:00
Christian Heimes f1dc3ee16d Issue #19218: Rename collections.abc to _collections_abc in order to speed up interpreter start 2013-10-13 02:04:20 +02:00
Christian Heimes f403f50378 Issue #19205: _osx_support uses the re module all over the place. Omit the test for nw. 2013-10-12 15:08:42 +02:00
Christian Heimes 179a3dbc9e Issue #19205: add debugging output for failing test on Snow Leopard 2013-10-12 12:32:21 +02:00
Christian Heimes 2582762b1b Issue #19209: Remove import of copyreg from the os module to speed up
interpreter startup. stat_result and statvfs_result are now hard-coded to
reside in the os module.
The patch is based on Victor Stinner's patch.
2013-10-12 01:27:08 +02:00
Christian Heimes 1a5fb4e3c1 Also test that the locale module isn't loaded during normal startup 2013-10-12 01:00:51 +02:00
Christian Heimes 8c9cd5a3d4 Issue #19205: Don't import the 're' module in site and sysconfig module to
to speed up interpreter start.
2013-10-12 00:24:55 +02:00
R David Murray f11caa0bba Merge #18206: Fix test for existence of license URL.
This test will fail because a previous attempt to fix a merge error
in site.py was incorrect, but the test wasn't running so it wasn't
caught.  The next commit will fix the site.py bug.
2013-09-14 13:31:14 -04:00
R David Murray 1bc6ceba92 #18206: Fix test for existence of license URL.
It now always checks, instead of only when the LICENSE file doesn't exist.  It
is also protected by the 'network' resource, and uses a HEAD request since we
are only doing an existence check.
2013-09-14 13:28:37 -04:00
Senthil Kumaran 2f2ae39037 merge from 3.3
Fix License URL display and add test to check for license url presence.
Fixes issue #18206 Patch contributed by  Berker Peksag and py.user
2013-09-07 14:09:48 -07:00
Senthil Kumaran 8ef519b24f Fix License URL display and add test to check for license url presence.
Fixes issue #18206 Patch contributed by  Berker Peksag and py.user
2013-09-07 13:59:17 -07:00
Brett Cannon 679ecb565b Issue #15767: back out 8a0ed9f63c6e, finishing the removal of
ModuleNotFoundError.
2013-07-04 17:51:50 -04:00
Brett Cannon 3e9a9ae09d Update various test modules to use unittest.main() for test discovery
instead of manually listing tests for test.support.run_unittest().
2013-06-12 21:25:59 -04:00
Brett Cannon b1611e2772 Issue #15767: Introduce ModuleNotFoundError, a subclass of
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.
2013-06-12 16:59:46 -04:00
Christian Heimes de0b962998 Remove sys.platform == 'riscos' checks from some Python and test files. #16501 2012-11-19 00:59:39 +01:00
Jesus Cea f01d695ccd Closes #16135: Removal of OS/2 support 2012-10-05 03:36:11 +02:00
Brett Cannon 8ac95ee62a Fix test_site from modifying sysconfig._CONFIG_VARS. 2012-04-04 17:31:16 -04:00
Ned Deily d531b295f2 Issue #10881: Fix test_site failure with OS X framework builds. 2012-02-06 00:58:18 +01:00
Ned Deily 316f573d9c Issue #13304: Skip test case if user site-packages disabled (-s or
PYTHONNOUSERSITE).  (Patch by Carl Meyer)
2011-10-31 16:16:35 -07:00
Éric Araujo 63ebe1c309 Fix test_site for systems without unsetenv. Reported by Zsolt Cserna. 2011-01-03 17:51:11 +00:00
R. David Murray ad4ccfdeb2 Skip test that does not raise an error on Windows.
I'm assuming that the putative path from the malformed
pth file is simply not found and therefore ignored.
2010-12-27 04:31:48 +00:00
R. David Murray ab9d8d64a7 Escape file path before searching for it in output via regex 2010-12-27 00:03:13 +00:00
R. David Murray b4ca59b783 #5258/#10642: print fn, line, traceback and continue when .pth file is broken
If a .pth file contained an error, it could cause a traceback in site.py,
terminating its processing.  In 2.7 and 3.2, the interpreter will then not
start.  Previously, a message would print saying to use -v to get the
traceback.  In either case, the traceback generated for a failed .pth file did
not include the .pth filename, making it difficult to debug the problem.  Now
site.py reports not only the .pth filename but also the line number causing the
error, and just skips the remainder of the file.
2010-12-26 19:54:29 +00:00
Ezio Melotti b3aedd4862 #9424: Replace deprecated assert* methods in the Python test suite. 2010-11-20 19:04:17 +00:00
Antoine Pitrou fce7fd6426 Issue #9549: sys.setdefaultencoding() and PyUnicode_SetDefaultEncoding()
are now removed, since their effect was inexistent in 3.x (the default
encoding is hardcoded to utf-8 and cannot be changed).
2010-09-01 18:54:56 +00:00
Ezio Melotti fc8b205da2 Correct a couple of assert* methods. Patch by Dave Malcolm. 2010-08-17 08:35:41 +00:00
Ronald Oussoren bda4672b01 Ensure that test_site actually passes with a framework build 2010-08-01 09:02:50 +00:00
Brett Cannon bbb2d492bc Merged revisions 81152 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81152 | brett.cannon | 2010-05-13 16:59:41 -0700 (Thu, 13 May 2010) | 3 lines

  test_site was failing under darwin for non-framework builds because a test was
  assuming framework-specific site-packages directories were being used.
........
2010-05-14 00:04:56 +00:00
Victor Stinner f3bc258b94 Issue #8340, test_abs_path() of test_site: encode paths to ASCII with
backslashreplace to avoid locale issues, don't write stderr to a pipe to ease
debug, separate directories by newlines instead of a space.
2010-04-18 07:59:53 +00:00
Barry Warsaw 28a691b7fd PEP 3147 2010-04-17 00:19:56 +00:00
Tarek Ziadé edacea30e4 Merged revisions 77704,77752 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r77704 | tarek.ziade | 2010-01-23 10:23:15 +0100 (Sat, 23 Jan 2010) | 1 line

  taking sysconfig out of distutils
........
  r77752 | tarek.ziade | 2010-01-26 00:19:56 +0100 (Tue, 26 Jan 2010) | 1 line

  switched the call order so this call works without suffering from issue #7774
........
2010-01-29 11:41:03 +00:00
Ezio Melotti b58e0bd8bb use assert[Not]In where appropriate 2010-01-23 15:40:09 +00:00
Benjamin Peterson 577473fe68 use assert[Not]In where appropriate
A patch from Dave Malcolm.
2010-01-19 00:09:57 +00:00
Antoine Pitrou 9166e6afdf Merged revisions 76047 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r76047 | antoine.pitrou | 2009-11-02 00:54:20 +0100 (lun., 02 nov. 2009) | 3 lines

  Fix and improve some assertions in test_site
........
2009-11-01 23:55:40 +00:00
Tarek Ziadé 8c0e217158 Merged revisions 75871 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r75871 | tarek.ziade | 2009-10-27 22:20:27 +0100 (Tue, 27 Oct 2009) | 1 line

  Issue #7218: Fix test_site for win32
........
2009-10-27 21:24:21 +00:00
Nick Coghlan 6ead552b47 Note that a number of the changes listed below were not applicable to the 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
........
2009-10-18 13:19:33 +00:00
Tarek Ziadé 4a608c0619 Merged revisions 74526 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74526 | tarek.ziade | 2009-08-20 23:23:13 +0200 (Thu, 20 Aug 2009) | 1 line

  #6693: New functions in site.py to get user/global site packages paths.
........
2009-08-20 21:28:05 +00:00
Benjamin Peterson c9c0f201fe convert old fail* assertions to assert* 2009-06-30 23:06:06 +00:00