Fix up various issues in RBTools tests.
Review Request #10952 — Created March 13, 2020 and submitted
There are a few issues that cropped up in the RBTools test suite,
especially when running on Python 3:
- A bad merge made it so we were no longer importing parse_qsl and
urlparse where they were used.
- Some assertions were checking that some data were
they ought to have been checking for the native string type.
- A typo had
ItemResourceTests.tearDowncalling the superclass'
setUpmethod instead of
- hgsubversion tests haven't worked for a while (the test infrastructure
overrides the .hgrc but the only way to install the hgsubversion
extension is via .hgrc). Unfortunately some change made it so that
after the setUpClass was called, if we then skipped the test, we'd end
up with a bad cwd for the rest of the test suite, resulting in a bunch
of broken tests. I haven't yet fixed this, but I have improved the way
that tests are skipped when hgsubversion isn't available, resulting in
both faster execution and avoiding the cwd problems.
- In Python 3,
re.splitbehaves somewhat differently when there's a
*character in the regex. This was resulting in SVN path splitting
creating a list with every single character split instead of properly
splitting only on slashes.
/+is a more correct regex for this
Ran unit tests on Python 2 and 3.
Handle hgsubversion test skipping in a much better way (improves output significantly and unbreaks hgrc writing). It looks like we have the same issue on release-1.0.x, so I'm planning on backporting that part of this change.
Revision 2 (+106 -98)
Checks run (2 succeeded)
Make requested changes
Revision 3 (+106 -98)