[svn r57321] merging the event branch:

* moving in test, misc, code, io directories and
  py/__init__.py
* py/bin/_find.py does not print to stderr anymore
* a few fixes to conftest files in other dirs
some more fixes and adjustments pending

--HG--
branch : trunk
This commit is contained in:
hpk
2008-08-16 17:26:59 +02:00
parent 7428eadf7d
commit abc8cf09aa
187 changed files with 27242 additions and 18 deletions

View File

@@ -0,0 +1 @@
#

View File

@@ -0,0 +1 @@
from package import shared_lib

View File

@@ -0,0 +1 @@
import shared_lib

View File

@@ -0,0 +1,3 @@
"""
Just a dummy module
"""

View File

@@ -0,0 +1,52 @@
import sys
import os
def setup_module(mod=None):
if mod is None:
f = __file__
else:
f = mod.__file__
sys.path.append(os.path.dirname(os.path.dirname(f)))
def teardown_module(mod=None):
if mod is None:
f = __file__
else:
f = mod.__file__
sys.path.remove(os.path.dirname(os.path.dirname(f)))
def test_import():
global shared_lib, module_that_imports_shared_lib
import shared_lib
from package import shared_lib as shared_lib2
import module_that_imports_shared_lib
import absolute_import_shared_lib
all_modules = [
('shared_lib', shared_lib),
('shared_lib2', shared_lib2),
('module_that_imports_shared_lib',
module_that_imports_shared_lib.shared_lib),
('absolute_import_shared_lib',
absolute_import_shared_lib.shared_lib),
]
bad_matches = []
while all_modules:
name1, mod1 = all_modules[0]
all_modules = all_modules[1:]
for name2, mod2 in all_modules:
if mod1 is not mod2:
bad_matches.append((name1, mod1, name2, mod2))
for name1, mod1, name2, mod2 in bad_matches:
print "These modules should be identical:"
print " %s:" % name1
print " ", mod1
print " %s:" % name2
print " ", mod2
print
if bad_matches:
assert False
if __name__ == "__main__":
setup_module()
test_import
teardown_module()