diff --git a/test/metadata.py b/test/metadata.py index 4d877ed..90b6ae8 100644 --- a/test/metadata.py +++ b/test/metadata.py @@ -1,3 +1,5 @@ +from __future__ import print_function + import unittest from llvm.core import * @@ -47,7 +49,7 @@ class TestMetaData(unittest.TestCase): ops = [MetaDataString.get(mod, "int"), root] md1 = MetaData.get(mod, ops) MetaData.add_named_operand(mod, 'tbaa', md1) - print md1 + print(md1) ops = [MetaDataString.get(mod, "const float"), root, @@ -55,9 +57,9 @@ class TestMetaData(unittest.TestCase): md2 = MetaData.get(mod, ops) MetaData.add_named_operand(mod, 'tbaa', md2) - print md2 + print(md2) - print mod + print(mod) if __name__ == '__main__': diff --git a/test/testall.py b/test/testall.py index ed7a8a1..3b5f0c3 100644 --- a/test/testall.py +++ b/test/testall.py @@ -79,9 +79,11 @@ def do_module(): class strstream(object): def __init__(self): - self.s = '' + self.s = b'' def write(self, data): + if not isinstance(data, bytes): + data = data.encode('utf-8') self.s += data def read(self):