fix more tests for Python 2.6

This commit is contained in:
Ilan Schnell 2012-08-12 23:12:55 -05:00
commit 7f3550f93d
2 changed files with 12 additions and 3 deletions

View file

@ -1,6 +1,9 @@
#!/usr/bin/env python
# Tests accessing of instruction operands.
import sys
import logging
import unittest
from llvm.core import *
try:
@ -8,8 +11,6 @@ try:
except ImportError:
from io import StringIO
import logging, unittest
m = None
#===----------------------------------------------------------------------===
@ -32,6 +33,14 @@ entry:
"""
class TestOperands(unittest.TestCase):
if sys.version_info[:2] < (2, 7):
def assertIs(self, expr1, expr2, msg=None):
if expr1 is not expr2:
standardMsg = '%s is not %s' % (safe_repr(expr1),
safe_repr(expr2))
self.fail(self._formatMessage(msg, standardMsg))
def test_operands(self):
m = Module.from_assembly(StringIO(test_module))
logging.debug("-"*60)