Merge lp:~jml/testtools/address-0.9.18-release-issues into lp:~testtools-committers/testtools/trunk

Proposed by Jonathan Lange
Status: Merged
Merged at revision: 282
Proposed branch: lp:~jml/testtools/address-0.9.18-release-issues
Merge into: lp:~testtools-committers/testtools/trunk
Diff against target: 0 lines
To merge this branch: bzr merge lp:~jml/testtools/address-0.9.18-release-issues
Reviewer Review Type Date Requested Status
Martin Packman Approve
Review via email: mp+130557@code.launchpad.net

Commit message

Fix Python 3 cosmetic errors and include matcher tests in the release

Description of the change

Attacks the cosmetic Python 3.3 errors by sorting dict output.

Includes the matcher tests, allowing the tests to be run from the tarball.

To post a comment you must log in.
286. By Jonathan Lange

Broaden the check to include PermissionError.

Revision history for this message
Martin Packman (gz) wrote :

Looks good overall.

+ if sys.version_info > (3, 3):
+ return "FileExistsError"

As discussed on IRC, Python 3.3 makes the exception name we should expect platform-dependant, so would be best to allow either using MatchesRegex or similar.

+ if sys.version_info > (3, 3):
+ error = 'TypeError'
+ else:
+ error = 'SyntaxError'
+ self.assertIn(self._as_output("\n%s: " % (error,)), textoutput)

Just ran this with the pre-release Python 3.3 I had installed and the test failed. Probably wants the same treatment of just accepting both exception names, rather than using a version check?

review: Needs Fixing
Revision history for this message
Martin Packman (gz) wrote :

And the change to the OSError name has been pushed, so this can be landed.

review: Approve
287. By Jonathan Lange

Address mgz's comment.

Preview Diff

Empty

Subscribers

People subscribed via source and target branches