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

Increase test coverage #146

Merged
merged 2 commits into from
Oct 12, 2023

Conversation

arkid15r
Copy link
Contributor

Hi mitreattack-python team.

Please consider this PR aiming to partially address #86:

  • Add collections tests
  • Add stix20 tests
  • Extract collection from the testing_data.py to a collection-1.json keeping it available for import from the former file

I enabled the GH test job (can be disabled back if needed as it still takes 10+ minutes to complete) and added some unrelated minor code changes by running black formatter.

Please let me know if you'd like the PR code to be somehow improved/restructured etc.
The successful test job run.

Questions/concerns: while working on the PR I've noticed some inconsistency with the json files encoding (utf-8 vs utf-16). It looks like the added .json files being recognized by GH diff as binary. Not sure if I did that in a right way here as haven't worked w/ utf-16 jsons before.

The coverage report screenshot:
latest

  - Add  collections tests
  - Add stix20 tests
  - Extract collection from the testing_data.py to a collection-1.json
     keeping it available for import from the former file
  - Enable GH test job
@sonarcloud
Copy link

sonarcloud bot commented Sep 14, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@arkid15r
Copy link
Contributor Author

Can any of the code owners review this PR?

Thank you

@jondricek jondricek self-requested a review October 11, 2023 18:29
@jondricek
Copy link
Contributor

Thank you so much for your contributions! They look good to me so I'll go ahead and merge it in now. Since they still take a fair chunk of time to run I'l comment the GitHub workflow out after I see them succeed once, but this is really helpful!

@jondricek jondricek merged commit 3b57b6e into mitre-attack:master Oct 12, 2023
2 checks passed
@arkid15r arkid15r deleted the ark/86-increase-test-coverage branch October 12, 2023 20:27
@arkid15r
Copy link
Contributor Author

Thanks for merging this, Jared!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants