Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extractors loaded for unrelated tests #1707

Closed
williballenthin opened this issue Aug 11, 2023 · 3 comments · Fixed by #1708
Closed

extractors loaded for unrelated tests #1707

williballenthin opened this issue Aug 11, 2023 · 3 comments · Fixed by #1708
Assignees
Labels
bug Something isn't working

Comments

@williballenthin
Copy link
Collaborator

williballenthin commented Aug 11, 2023

in fixtures.py at the top level, we call get_*_extractor for a selection of samples to compute their hashes. because this is at the top level, this is done at import time, rather then when the relevant test is invoked. this slows down the invocation of other tests.

capa/tests/fixtures.py

Lines 668 to 670 in 19495f6

get_pefile_extractor(get_data_path_by_name("mimikatz")),
SampleHashes(
md5="5f66b82558ca92e54e77f216ef4c066c",

@williballenthin williballenthin added the bug Something isn't working label Aug 11, 2023
@williballenthin williballenthin self-assigned this Aug 11, 2023
@williballenthin
Copy link
Collaborator Author

since these fixtures aren't used by more than one test, they can be just as easily embedded in the single test file

@yelhamer
Copy link
Collaborator

Good call! Thank you!

@yelhamer
Copy link
Collaborator

fixed in #1708

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants