Merge lp:~tcole/ubuntuone-dev-tools/qname-in-errors into lp:ubuntuone-dev-tools

Proposed by Tim Cole
Status: Merged
Approved by: Tim Cole
Approved revision: 42
Merged at revision: 43
Proposed branch: lp:~tcole/ubuntuone-dev-tools/qname-in-errors
Merge into: lp:ubuntuone-dev-tools
Diff against target: 26 lines (+5/-2)
2 files modified
ubuntuone/devtools/testing/txcheck.py (+1/-1)
ubuntuone/devtools/tests/test_txcheck.py (+4/-1)
To merge this branch: bzr merge lp:~tcole/ubuntuone-dev-tools/qname-in-errors
Reviewer Review Type Date Requested Status
Diego Sarmentero (community) Approve
Manuel de la Peña (community) Approve
Review via email: mp+80549@code.launchpad.net

Commit message

Show qualified class names in errors.

Description of the change

Show qualified class names in errors.

To post a comment you must log in.
Revision history for this message
Manuel de la Peña (mandel) :
review: Approve
Revision history for this message
Diego Sarmentero (diegosarmentero) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntuone/devtools/testing/txcheck.py'
2--- ubuntuone/devtools/testing/txcheck.py 2011-10-24 15:56:44 +0000
3+++ ubuntuone/devtools/testing/txcheck.py 2011-10-27 10:21:30 +0000
4@@ -30,7 +30,7 @@
5
6 def type_to_name(type_obj):
7 """Return a name for a type."""
8- package_name = getattr(type_obj, '__package__', None)
9+ package_name = getattr(type_obj, '__module__', None)
10 if package_name:
11 return "%s.%s" % (package_name, type_obj.__name__)
12 else:
13
14=== modified file 'ubuntuone/devtools/tests/test_txcheck.py'
15--- ubuntuone/devtools/tests/test_txcheck.py 2011-10-24 14:53:26 +0000
16+++ ubuntuone/devtools/tests/test_txcheck.py 2011-10-27 10:21:30 +0000
17@@ -213,5 +213,8 @@
18
19 self.assertEqual(len(result.failures), 1)
20 failure = result.failures[0][1]
21+ package_name = type(self).__module__
22+ class_name = BrokenTestCase.__name__
23+ full_method_name = "%s.%s.setUp" % (package_name, class_name)
24 self.assertNotEqual(failure.find("SuperResultDiscarded"), -1)
25- self.assertNotEqual(failure.find("BrokenTestCase.setUp"), -1)
26+ self.assertNotEqual(failure.find(full_method_name), -1)

Subscribers

People subscribed via source and target branches

to all changes: