mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
#7092: Silence more py3k warnings. Patch by Florent Xicluna.
This commit is contained in:
parent
17ae2ba78f
commit
dde5b94875
39 changed files with 102 additions and 85 deletions
|
@ -266,7 +266,7 @@ class ImportSideEffectTests(unittest.TestCase):
|
|||
site.abs__file__()
|
||||
for module in (sys, os, __builtin__):
|
||||
try:
|
||||
self.assertTrue(os.path.isabs(module.__file__), `module`)
|
||||
self.assertTrue(os.path.isabs(module.__file__), repr(module))
|
||||
except AttributeError:
|
||||
continue
|
||||
# We could try everything in sys.modules; however, when regrtest.py
|
||||
|
@ -318,7 +318,7 @@ class ImportSideEffectTests(unittest.TestCase):
|
|||
|
||||
def test_sitecustomize_executed(self):
|
||||
# If sitecustomize is available, it should have been imported.
|
||||
if not sys.modules.has_key("sitecustomize"):
|
||||
if "sitecustomize" not in sys.modules:
|
||||
try:
|
||||
import sitecustomize
|
||||
except ImportError:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue