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
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.
- Change Summary:
-
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.
- Commits:
-
Summary ID 2a63aa7985631f5ba5d2c1e1e0b5989263e6b1a2 855de04be826d8d9106fca3a4a6b98893dd28465
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.