move capa/features/__init__.py logic to common.py

also cleanup imports across the board,
thanks to pylance.
This commit is contained in:
William Ballenthin
2021-06-09 22:20:53 -06:00
parent 7029ad32c4
commit ac59e50b5f
46 changed files with 551 additions and 529 deletions

View File

@@ -5,18 +5,18 @@
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and limitations under the License.
import sys
import pytest
from fixtures import *
from fixtures import parametrize
import capa.features.file
import fixtures
from fixtures import *
from fixtures import parametrize
@parametrize(
"sample,scope,feature,expected",
FEATURE_PRESENCE_TESTS,
fixtures.FEATURE_PRESENCE_TESTS,
indirect=["sample", "scope"],
)
def test_pefile_features(sample, scope, feature, expected):
@@ -26,4 +26,4 @@ def test_pefile_features(sample, scope, feature, expected):
if isinstance(feature, capa.features.file.FunctionName):
pytest.xfail("pefile only doesn't extract function names")
do_test_feature_presence(get_pefile_extractor, sample, scope, feature, expected)
fixtures.do_test_feature_presence(fixtures.get_pefile_extractor, sample, scope, feature, expected)