[GSK-1508] Add unit tests for WebSocket-based ML Worker communication (python)#1277
[GSK-1508] Add unit tests for WebSocket-based ML Worker communication (python)#1277
Conversation
|
Please add the 'safe for build' label in order to perform the sonar analysis! |
|
@Inokinoki could you check the comments and refresh this PR please? |
This comment was marked as outdated.
This comment was marked as outdated.
andreybavt
left a comment
There was a problem hiding this comment.
General comment: Can you reduce code duplication in tests? It makes them harder to maintain in the future.
To have an inspiration about how tests could be structured you can refer to Uncle Bob's "Clean Code" that gives a few good advice:
https://blog.cleancoder.com/uncle-bob/2013/09/23/Test-first.html
the main points are:
- test code quality criterias shouldn't be different from production code (duplication isn't appreciated in either of them)
- tests should be small and focused
|
@Googleton I also created a bunch of tests for DTOs in push feature. Could you please review them and tell me if I understand well? |
Hartorn
left a comment
There was a problem hiding this comment.
I feel like you made too many tests :p
What I mean is the following : tests are done to ensure our code is functioning
Adding one test to make sure some lib is properly working is fine, but extensively testing validation for every pydantic object is too much : we have to assume that the libs we use are working as expected.
1636e35 to
5adda4f
Compare
c5373ed to
20ba20d
Compare
57fe93d to
c90696c
Compare
c90696c to
e80ca29
Compare
|
Thanks very much for greatly improving this PR @Hartorn ! |
5dabeb5 to
1471b38
Compare
f709d1d to
3bed1e1
Compare
(Squashed commits of @Inokinoki) Contributes to #GSK-1508
3bed1e1 to
0402fc7
Compare
|
Kudos, SonarCloud Quality Gate passed! |








Description
Related Issue
Type of Change
Checklist
CODE_OF_CONDUCT.mddocument.CONTRIBUTING.mdguide.make codestyle.