| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Why are you creating a faux unittest? Please use the actual module, I suggest you look at the many other tests in Lib/test/.
Sorry, something went wrong.
- Clean up trailing spaces on all lines - Maintain proper code formatting and readability - All tests continue to pass successfully
|
I am closing this. The immediate problem with the proposed tests is that they catch assert failures and then fail. This is not how unittests should be written. The bigger problem is that turtledemo is not a library module. It is a GUI app that serves as dynamic documentation of turtle library features. Its command line interface is empty in the sense that there are no command line options to test. But the minimal CLI of running the file is not tested -- and should not be. Testing library module CLIs meaning running the module with various arguments and testing that the stdout and possibly stderr output matches expectations. Turtledemo has instead an interactive user interface. Running it displays the GUI app, which then waits for user mouse clicks. There is no text output and would be no graceful way to close it from a unittest. Testing a GUI is entirely different from testing a CLI, and turtledemo is not designed for automated unit testing. It has to be manually tested, which I have done extensively. Anyone touching it should do the same. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
gh-131178: add unittest for turtledemo command line interface