Learn more about these different git repos.
Other Git URLs
While preparing the Debian pagure package to run its testsuite, I noticed that test_request_pull_close is non-deterministic and can fail depending on the system load.
test_request_pull_close
The test expects (at many places) to see a string like:
Merged just now...
However, in my system, the string was actually:
Merged seconds ago...
This made the test fail. I don't know if assertIn can be made to expect a regexp; I'll try to investigate this further. Meanwhile, I thought it'd be good to file this bug for the record.
assertIn
There's assertRegex:
assertRegex
https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertRegex
I don't think assertIn accepts a regexp.
We have regex tests already, but the approach is different: use an standard Python re.match(), then assert on its result :)
re.match()
I couldn't find the re.match() tests, so I went ahead and prepared a patch with assertRegex. I'll create the PR in a few minutes.
https://pagure.io/pagure/pull-request/4752
Commit 1c9abcd fixes this issue
Login to comment on this ticket.