Enable tests for vivisect in Python3

Now we support vivisect as backend in Python3. We should test it.
This commit is contained in:
Ana Maria Martinez Gomez
2021-02-09 20:04:30 +01:00
parent fc438866ec
commit bbb7878e0a
2 changed files with 3 additions and 9 deletions

View File

@@ -520,11 +520,7 @@ def do_test_feature_count(get_extractor, sample, scope, feature, expected):
def get_extractor(path):
if sys.version_info >= (3, 0):
extractor = get_smda_extractor(path)
else:
extractor = get_viv_extractor(path)
extractor = get_viv_extractor(path)
# overload the extractor so that the fixture exposes `extractor.path`
setattr(extractor, "path", path)
return extractor

View File

@@ -16,8 +16,7 @@ from fixtures import *
indirect=["sample", "scope"],
)
def test_viv_features(sample, scope, feature, expected):
with xfail(sys.version_info >= (3, 0), reason="vivsect only works on py2"):
do_test_feature_presence(get_viv_extractor, sample, scope, feature, expected)
do_test_feature_presence(get_viv_extractor, sample, scope, feature, expected)
@parametrize(
@@ -26,5 +25,4 @@ def test_viv_features(sample, scope, feature, expected):
indirect=["sample", "scope"],
)
def test_viv_feature_counts(sample, scope, feature, expected):
with xfail(sys.version_info >= (3, 0), reason="vivsect only works on py2"):
do_test_feature_count(get_viv_extractor, sample, scope, feature, expected)
do_test_feature_count(get_viv_extractor, sample, scope, feature, expected)