Fix up various issues in RBTools tests.
Review Request #10952 — Created March 13, 2020 and submitted — Latest diff uploaded
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
six.text_type
when
they ought to have been checking for the native string type. - A typo had
ItemResourceTests.tearDown
calling the superclass'
setUp
method instead oftearDown
. - 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.split
behaves 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
anyway.
Ran unit tests on Python 2 and 3.