Commit 211a2e7b authored by Łukasz Nowak's avatar Łukasz Nowak

- remove tests for wrong way of using interpreter


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40110 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d64b19e6
......@@ -54,80 +54,6 @@ def readElfAsDict(f):
runpath_list=sorted(runpath_list)
)
class AssertPythonSoftware(unittest.TestCase):
"""Asserts that python related software is in good shape."""
def test_python_version(self):
"""Check built python version"""
self.assertEqual((2,4), sys.version_info[:2])
def test_use_generated_python(self):
"""Checks generated python as python"""
fd, name = tempfile.mkstemp()
try:
f = os.fdopen(fd, 'w')
f.write("""\
#!%s
import sys
print sys.version_info[:2]
""" % sys.executable)
f.close()
f_stat = os.stat(name)
os.chmod(name, f_stat.st_mode | stat.S_IXUSR)
result = subprocess.Popen([name], stdout=subprocess.PIPE)\
.communicate()[0].strip()
self.assertEqual('(2, 4)', result)
finally:
os.unlink(name)
def test_use_generated_python_as_normal_interpreter(self):
"""Checks behaviour of generated python as interpreter"""
stdout, stderr = subprocess.Popen(["bin/python2.4", "-V"],
stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
self.assertTrue('Python 2.4' in stderr)
def test_required_libraries(self):
"""Checks possibility of importing libraries"""
ignored_library_list = getCleanList("""
socks
""")
required_library_list = getCleanList("""
ERP5Diff
MySQLdb
SOAPpy
_ssl
_xmlplus
bz2
cElementTree
elementtree
fpconst
gdbm
itools
ldap
lxml
mechanize
memcache
numpy
paramiko
ply
pytz
readline
simplejson
threadframe
uuid
xml
xml.parsers.expat
zlib
""")
failed_library_list = []
for lib in required_library_list:
try:
__import__(lib)
except ImportError:
failed_library_list.append(lib)
self.assertEqual([], failed_library_list,
'Python libraries not found:\n'+'\n'.join(failed_library_list))
class AssertLddLibs(unittest.TestCase):
"""Checks for dynamic libraries"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment