diff options
| author | Robert Collins <robertc@robertcollins.net> | 2011-04-25 13:10:06 +1200 |
|---|---|---|
| committer | Robert Collins <robertc@robertcollins.net> | 2011-04-25 13:10:06 +1200 |
| commit | b05ec2c069cdbc19dffa1061323aaf2f6c3b8568 (patch) | |
| tree | 1be189fad24596e6bb5cf2601738e163eeaa4f95 /python | |
| parent | e9548695dc187a9f7e9f0494408b6d07ede547f2 (diff) | |
| download | subunit-git-b05ec2c069cdbc19dffa1061323aaf2f6c3b8568.tar.gz | |
Tags in the API are strings. And python3 exception names.
Diffstat (limited to 'python')
| -rw-r--r-- | python/subunit/__init__.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/python/subunit/__init__.py b/python/subunit/__init__.py index c997296..6e1668e 100644 --- a/python/subunit/__init__.py +++ b/python/subunit/__init__.py @@ -127,7 +127,11 @@ from testtools.compat import _b, _u, BytesIO, StringIO try: from testtools.testresult.real import _StringException RemoteException = _StringException - _remote_exception_str = '_StringException' # For testing. + # For testing: different pythons have different str() implementations. + if sys.version_info > (3, 0): + _remote_exception_str = 'testtools.testresult.real._StringException' + else: + _remote_exception_str = '_StringException' except ImportError: raise ImportError ("testtools.testresult.real does not contain " "_StringException, check your version.") @@ -502,7 +506,7 @@ class TestProtocolServer(object): def _handleTags(self, offset, line): """Process a tags command.""" - tags = line[offset:].split() + tags = line[offset:].decode('utf8').split() new_tags, gone_tags = tags_to_new_gone(tags) self.client.tags(new_tags, gone_tags) |
