When I went and ran it, I discovered not one but six bugs!
- A change to the MozTrap API had broken moztrap-connect (which pytest-moztrap depends on).
- A conflict between moztrap-connect being set to retrieve all objects (no pagination), the number of objects in the database, and the default django throttle was causing cryptic Service Unavailable messages. Alternately, setting limit to a non-zero number without looping on the 'next' pages could cause premature NoSuchObject exceptions.
- The tests-within-tests were numbered using their run-case-version IDs rather than their test-case IDs. The contortions the code went through to handle this were kinda insane.
- pytest-moztrap does not support the 'Test Series as a template for a Test Run' feature recently implemented (and made the default for new Test Runs) in MozTrap. Nor does MozTrap's API expose it.
- The setup.py file for pytest-moztrap did not include a class provided in the repo and required by it, so user installations done with 'python setup.py install' would fail while developer installs done with 'python setup.py develop' (ie, mine) would succeed.
- Due to updates to py.test, xfails are not being detected and skips are being handled wrong.
This got me started thinking about how to prevent #1 and #6 from happening again, or at least notice much sooner if they do.
Regarding #1, I think moztrap-connect should be included within the main MozTrap repo so it's tests can be run at the same time. If the senior programmer doesn't agree to that, I can arrange some kind of semaphore instead so that I can trigger moztrap-connect test runs off of MozTrap changes. I think the two can co-exist in the same repo because they are installed in different ways. MozTrap is installed by calling 'bin/install-reqs' whereas moztrap-connect is installed via 'python setup.py install'.
Regarding #6, I am certain the owner/maintainer of py.test would not find pytest-moztrap relevant enough to his user-base to include it in the main repo. While it might be possible to arrange a semaphore, I also had another idea. I could use the two-different install methods to define two different test jobs, one that installs via 'python setup.py install' and the other which installs via 'pip install -Ur requirements.txt'. The setup.py version, which users would use, would have its version pinned to the most recent known good py.test version. The requirements.txt version would install the most recent version. Result, the maintainer knows about changes to the dependency before the users run into it.
While I've already fixed #3 and #5, and I look forward to fixing #4, the upshot of items #1-6 is that I won't be hitting 'publish' on the pytest-moztrap announcement until after all of those bugs are fixed and I've finished the work I started on MozTrap's API for the benefit of the moztrap-tests, moztrap-connect and pytest-moztrap's test fixtures.