-
Notifications
You must be signed in to change notification settings - Fork 4
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
Operation refactor (part 1) #37
Conversation
Codecov Report
@@ Coverage Diff @@
## unstable #37 +/- ##
============================================
+ Coverage 81.76% 83.13% +1.36%
============================================
Files 34 36 +2
Lines 2462 2567 +105
============================================
+ Hits 2013 2134 +121
+ Misses 449 433 -16
|
5214169
to
67b22c8
Compare
SonarCloud is raising duplication errors on the test strings. Should I try to fix? @voneiden |
The duplication errors are for the four last tests which share a very similar structure. If you want to get your hands dirty, check out parametrization @ https://docs.pytest.org/en/6.2.x/parametrize.html You could parametrize the tool(s) and expected outputs and have a single test. The test string code smell nags are because there are no line breaks but the strings are broken into multiple string sections, like x = ("foo" "bar") vs x = ("foo"
"bar") It's also not necessary to always test full gcode output - in fact testing only within the scope of the test would be preferable in this case. Makes the test less fragile to noise. |
The test string is modified by black so If I add the line then black check will fail |
Can I parametrize across test files. test_pocket, test_profile and test_drill they same the exact same thing. The operation that happens is irrelevant since we are just checking what gets added between operation. Where should I include such a test? A new test_tool_change file? @voneiden |
My bad. Maybe that can be resolved by adding a comment on the first line, then black shouldn't be able to touch the line breaks: x = (
# black
"foo"
"bar"
) L |
New file is fine and perhaps the operation can be one parameter of the test. |
0e31ea4
to
dfd86e2
Compare
dfd86e2
to
1cb1784
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Please retry analysis of this Pull-Request directly on SonarCloud. |
Ready! @voneiden |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you.
I am introducing Tool and Spindle changes to the Fluent API and all the necessary tests
In Part 2 I will be introducing Feed changes. This is going to be messier so I opted for breaking them into 2 PR.