Changelog: bv.write and bv.insert require a bytes object in python3 Architecture.assemble outputs a bytes object in python3, a str in python2 Architecture.assemble will throw a value error if it cannot assemble the given instruction API install script should be run in the version of python you want it installed in Fundamental python changes to be aware of: Unicode-type strings are now just str, consequently anything that came out as a unicode string before (annotations) are now just str. Longs no longer exist. They're just ints.
Diffstat (limited to 'suite/api_test.py')
-rw-r--r--suite/api_test.py43
1 files changed, 0 insertions, 43 deletions
diff --git a/suite/api_test.py b/suite/api_test.py
index a162d26a..740f88e3 100644
--- a/suite/api_test.py
+++ b/suite/api_test.py
@@ -1,17 +1,10 @@
import unittest
-import time
import platform
import os
-import tempfile
-import zipfile
-import urllib
-import subprocess
-import getpass
from binaryninja.setting import Setting
from binaryninja.metadata import Metadata
from binaryninja.demangle import demangle_gnu3, get_qualified_name
from binaryninja.architecture import Architecture
-from binaryninja.binaryview import BinaryViewType
class SettingsAPI(unittest.TestCase):
@@ -226,39 +219,3 @@ class DemanglerTest(unittest.TestCase):
for i, test in enumerate(tests):
t, n = demangle_gnu3(Architecture['x86'], test)
assert self.get_type_string(t, n) == results[i]
-
-
-class TimingTest(unittest.TestCase):
- def unpackage_file(self, file):
- if not os.path.exists(file):
- with zipfile.ZipFile(file + ".zip", "r") as zf:
- zf.extractall()
- assert os.path.exists(file)
-
- def test_analysis_time(self):
- if platform.system() != "Linux" or getpass.getuser() != "jenkins":
- return
-
- start_time = time.time()
- file_names = [os.path.join(os.path.dirname(__file__), "binaries", "quick3dcoreplugin.dll"),
- os.path.join(os.path.dirname(__file__), "binaries", "md5"),
- os.path.join(os.path.dirname(__file__), "binaries", "ls")]
-
- for file_name in file_names:
- temp_name = next(tempfile._get_candidate_names()) + ".bndb"
- self.unpackage_file(file_name)
- try:
- bv = BinaryViewType.get_view_of_file(file_name)
- bv.create_database(temp_name)
- bv.file.close()
- bv = BinaryViewType.get_view_of_file(temp_name)
- bv.file.close()
- finally:
- if os.path.exists(file_name):
- os.unlink(file_name)
- if os.path.exists(temp_name):
- os.unlink(temp_name)
-
- time_s = time.time() - start_time
- commit = subprocess.check_output(["git", "rev-parse", "HEAD"])[:-1]
- conn = urllib.urlopen("https://script.google.com/macros/s/AKfycbxrZtlgLaWt3l95_7RyH9ceDdFIBm0VaR6jG1-4UDt6CFFCFzQ/exec?BuildID=%s&Test1=%.2f" % (commit, time_s))