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

Feature/create core test package #306

Merged
merged 6 commits into from
Mar 21, 2023
Merged

Conversation

essweine
Copy link
Contributor

This is basically pre-work for fixing up the execution model. I've

  • removed python2 mutex support and some related attributes (I guess -- they might have done something sometime, but they definitely don't have any effect now)
  • reorganized some of the task.py code so that related methods are near each other, making everything easier to understand
  • replaced PatternTest and the serializer test that inherited from it with a base class containing the tests and subclassed tests for each pattern. I am really sick of:
    • seeing that PatternTestfailed
    • editing the test to print out the workflows that no longer work to get an idea of what I'm up against instead of failing on the first one
    • then editing the test to run only each failing workflow at a time

I hope I've also fixed the problems with the CI job requiring a bunch of sys.path inserts to run the tests. I don't need them locally, but going to mark this as a draft until I figure out whether that works.

@essweine essweine marked this pull request as draft March 18, 2023 00:09
@essweine
Copy link
Contributor Author

Apparently the CI job still won't work, and I can't change it (or possibly don't know how, but there is no way to do so that's obvious to me). I run tests from the top directory with
python -m unittest discover -v -s .-p *Test.py
which seems to me like a totally reasonable way to run the tests (as opposed tocding to tests/SpiffWorkflow and then running the tests, which is what the CI job does) so IMO this is a problem that needs to be fixed.
Maybe somebody else who has more interest in solving this problem can take it over.

@github-advanced-security
Copy link

You have successfully added a new SonarCloud configuration ``. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab.

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

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

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@essweine essweine marked this pull request as ready for review March 18, 2023 18:15
@essweine
Copy link
Contributor Author

Turns out the tests with the failing imports were not to the new test, and also we were missing some schema files. Anyway, the tests pass now, no matter what directory they're run from. Sonarcloud thinks there's new code, but there really isn't anything new -- I just moved some things around so related methods were near each other, and removed some duplicated code.

@essweine essweine merged commit 3c3345c into main Mar 21, 2023
@essweine essweine deleted the feature/create-core-test-package branch March 21, 2023 01: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