| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| y: int = 0 | ||
| for Point in (PointFromCall, PointFromInheritance, PointFromClass): | ||
| with self.subTest(Point=Point): | ||
| p = Point(11, 22) |
There was a problem hiding this comment.
Should we test the class?
| p = Point(11, 22) | |
| p = Point(11, 22) | |
| assert isinstance(copy.replace(p, x=12), Point) |
Sorry, something went wrong.
There was a problem hiding this comment.
Why not? :)
Done.
Sorry, something went wrong.
There was a problem hiding this comment.
Oh I meant to test the copy, not the original p!
Sorry, something went wrong.
There was a problem hiding this comment.
I did not notice this conversation (I can't see the text few lines above the line I'm looking at), but I added a test for a copy just before merging. I was puzzled as to why the test for the original was added, but decided not to drag the review out.
Sorry, something went wrong.
There was a problem hiding this comment.
I did not think that such tests were necessary and that this was the right place for such tests. But I won't mind if you want to add them here.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
I've also added PointFromInheritance, since it is a very common pattern.