summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Snyder <ryan@vector35.com>2018-06-22 23:50:21 -0400
committerRyan Snyder <ryan@vector35.com>2018-07-10 18:11:10 -0400
commitfd42578dce78f4c5a530177426e6a2ea11fc95ed (patch)
tree032fabf37a895f0701447ae2e9e4976e19626e40
parent5d4015659d20cfee839ccccdcfb96094ac8e610a (diff)
tests: update for lifter, generator bugfixes
m---------suite/binaries0
-rwxr-xr-xsuite/generator.py4
-rw-r--r--suite/unit.py4
3 files changed, 4 insertions, 4 deletions
diff --git a/suite/binaries b/suite/binaries
-Subproject ab6b18161a5b9ccd3588c88233f150fb6c7e2ce
+Subproject d1f1e6f7e2207338a9f92d5980a2a795d1aca1c
diff --git a/suite/generator.py b/suite/generator.py
index 3302d118..ad0d24fc 100755
--- a/suite/generator.py
+++ b/suite/generator.py
@@ -80,7 +80,7 @@ class TestBinaryNinjaAPI(unittest.TestCase):
# Python 2 does not have the encodings option
self.oracle_test_data = pickle.load(open(os.path.join("{0}", "oracle.pkl"), "rb"), encoding='charmap')
except TypeError:
- self.oracle_test_data = pickle.load(open(os.path.join("{0}", "oracle.pkl"), "r"))
+ self.oracle_test_data = pickle.load(open(os.path.join("{0}", "oracle.pkl"), "rb"))
self.verifybuilder = testcommon.VerifyBuilder("{3}")
def run_binary_test(self, testfile):
@@ -94,7 +94,7 @@ class TestBinaryNinjaAPI(unittest.TestCase):
# Python 2 does not have the encodings option
binary_oracle = pickle.load(open(testname + ".pkl", "rb"), encoding='charmap')
except TypeError:
- binary_oracle = pickle.load(open(testname + ".pkl", "r"))
+ binary_oracle = pickle.load(open(testname + ".pkl", "rb"))
test_builder = testcommon.BinaryViewTestBuilder(testname, "{3}")
for method in test_builder.methods():
diff --git a/suite/unit.py b/suite/unit.py
index fe2c4b8c..9cbed511 100644
--- a/suite/unit.py
+++ b/suite/unit.py
@@ -71,7 +71,7 @@ class TestBinaryNinjaAPI(unittest.TestCase):
# Python 2 does not have the encodings option
self.oracle_test_data = pickle.load(open(os.path.join("suite", "oracle.pkl"), "rb"), encoding='charmap')
except TypeError:
- self.oracle_test_data = pickle.load(open(os.path.join("suite", "oracle.pkl"), "r"))
+ self.oracle_test_data = pickle.load(open(os.path.join("suite", "oracle.pkl"), "rb"))
self.verifybuilder = testcommon.VerifyBuilder("suite/binaries/test_corpus")
def run_binary_test(self, testfile):
@@ -85,7 +85,7 @@ class TestBinaryNinjaAPI(unittest.TestCase):
# Python 2 does not have the encodings option
binary_oracle = pickle.load(open(testname + ".pkl", "rb"), encoding='charmap')
except TypeError:
- binary_oracle = pickle.load(open(testname + ".pkl", "r"))
+ binary_oracle = pickle.load(open(testname + ".pkl", "rb"))
test_builder = testcommon.BinaryViewTestBuilder(testname, "suite/binaries/test_corpus")
for method in test_builder.methods():