Skip to content

Conversation

@chisholm
Copy link
Contributor

This simple PR shows the changes I made to class scanning to get unit tests running under tox again. The unit tests seem to run normally in the github runner now. They don't all pass though. This PR doesn't include the fixes to the unit tests; I wanted to have a simple PR which just shows the changes I made to get to the point where we could start addressing individual unit tests.

Class scanning is changed to look at the stix2 lib's registry. So it will only find classes which have been registered. I think it's better that way anyway. I had to hack around the workbench's patching of the registry. I think most of the time it won't be an issue in practice since probably most people don't use the workbench. But the unit tests include tests of the workbench, which causes the workbench module to be imported, which is what triggers the registry patching. So we needed a way to deal with that for unit testing, unfortunately.

@rpiazza
Copy link
Contributor

rpiazza commented Apr 2, 2025

Let's talk about this - I'm not sure your solution would find the impact extensions (availability-ext, integrity-ext, etc...) or any extension for that matter

@rpiazza rpiazza merged commit 03fd9de into oasis-open:fix-integer-constraint Apr 2, 2025
1 of 6 checks passed
@chisholm chisholm deleted the test_workflow branch April 10, 2025 03:44
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