Closed jeremygray closed 9 years ago
@jeremygray I certainly agree that automated tests would be easier. This is why I had started on them (as you found out) but have not kept them up as you found out (and was using an unusual shortcut to start Anaconda's Python version). I'm labelling this as an "enhancement" to keep it visible. I want to clean up some use of global variables and complete the configuration savings work (after which, I'll be able to smplify the with_app decorator substantially). Then, I will look into implementing a better way to run unittests.
Cool. I like pytest (some familiarity, not expert level). A plus is that it works well with travis-ci.org (free for open-source projects). I have not used unittest, nose, or others (?), but my impression is that pytest is more powerful. I don't know how they compare or to what extent the others are supported by continuous integration servers.
I have done very little automated tests seriously (just a hobbyist - rarely used github before!) but have tried unittest, nose, doctest (did lots of experimental work with doctest https://code.google.com/p/crunchy/source/browse/#svn%2Ftrunk%2Fcrunchy%2Fsrc%2Ftests for example) and pytest once or twice.
The choice of framework is somewhat secondary - from what I remember, I'd be perfectly happy to use pytest. What I need to do is learn about PyQt4 QtTest instead of using pywinauto. A quick search suggests that http://johnnado.com/pyqt-qtest-example/ would be a good starting place.
And, since I'm doing this project first for fun and learning (having it be useful for others is a nice bonus), I'd prefer to experiment on my own first to figure out how to do tests [and then, have others like you possibly tell me that I do it wrong and show me a better way ! :-) ]
I am also just a hobbyist. I've never used pytest to test a GUI, and am quite interested to learn how to do that. I look forward to seeing what you come up with!
I have asked on the PyQt mailing list and on stackoverflow and no one has been able to help me. Since it looks like it just will not happen, I am going to close this issue and update the docs to indicate that unit tests are unfortunately not performed.
Automated tests would make it much easier to support both python 2.7 and 3.4, e.g., using https://travis-ci.org
I tried to get tests to run using
python -m unittest discover
from the command line, but had multiple issues.Fixed PIL not being able to import Image by:
% sudo mkdir -p /opt/anaconda1anaconda2anaconda3/lib/ % sudo ln /Users/jgray/anaconda/lib/libtiff.5.dylib /opt/anaconda1anaconda2anaconda3/lib/libtiff.5.dylib
p2-tests-work-in-progress
for tweaks needed totest_easygui_qt.py
for it to be able to even run. These are just notes to share, not something to merge in this form.