How do I unit testing my GUI program with Python and PyQt?

后端 未结 1 1616
渐次进展
渐次进展 2021-02-04 01:36

I heard Unit Testing is a great method to keep code working correctly.

The unit testing usually puts a simple input to a function, and check its simple output. But how d

相关标签:
1条回答
  • 2021-02-04 01:51

    There's a good tutorial about using Python's unit testing framework with QTest here.

    It isn't about choosing one or the other. Instead, it's about using them together. The purpose of QTest is only to simulate keystrokes, mouse clicks, and mouse movement. Python's unit testing framework handles the rest (setup, teardown, launching tests, gathering results, etc.).

    0 讨论(0)
提交回复
热议问题