Ejemplo n.º 1
0
 def test_encoded_value(self, tmpdir_factory, byte_values, expected):
     fn = str(tmpdir_factory.mktemp('data').join('data.txt'))
     with open(fn, 'wb') as f:
         if sys.version_info >= (3, ):
             f.write(bytes(byte_values))
         else:
             f.write(bytearray(byte_values))
         f.close()
         bytestream = ByteStream(fn)
         assert DexParser.EncodedValue(bytestream).value == expected
Ejemplo n.º 2
0
 def test_apk_parsing_filtered_empty_result(self):
     tests = DexParser.parse(TEST_APK, ["com.linkedin.mdctestNOT"])
     assert not list(tests)
Ejemplo n.º 3
0
 def test_apk_parsing(self):
     tests = DexParser.parse(TEST_APK)
     assert sorted(tests) == TestDexParsing.EXPECTED_TESTS
Ejemplo n.º 4
0
 def test_apk_parsing_filtered(self):
     tests = DexParser.parse(TEST_APK, ["com.linkedin.mdctest"])
     assert sorted(tests) == TestDexParsing.EXPECTED_TESTS
Ejemplo n.º 5
0
 def test_apk_parsing_filtered_regex(self):
     tests = DexParser.parse(TEST_APK, ["re::com\.linkedin\.mdct.st[s]*"])
     assert sorted(tests) == TestDexParsing.EXPECTED_TESTS