create_signature=always causes test suite failure
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
In Progress
|
Undecided
|
Unassigned | ||
Breezy |
Fix Released
|
Medium
|
Jelmer Vernooij |
Bug Description
If one has create_signature = always (maybe also gpg_signing_key) set in the [DEFAULT] section of ~/.bazaar/
=======
FAIL: bzrlib.
-------
Traceback (most recent call last):
testtools.
File "/usr/lib/
raise self.failureExc
AssertionError: Failed doctest test for bzrlib.
File "/<<BUILDDIR>
-------
File "/<<BUILDDIR>
Failed example:
builder.
('add', ('', 'root-id', 'directory', '')),
('add', ('filename', 'f-id', 'file', 'content\n'))])
Exception raised:
Traceback (most recent call last):
File "/usr/lib/
File "<doctest bzrlib.
('add', ('filename', 'f-id', 'file', 'content\n'))])
File "/<<BUILDDIR>
File "/<<BUILDDIR>
**kwargs)
File "/<<BUILDDIR>
result = unbound(self, *args, **kwargs)
File "/<<BUILDDIR>
*args, **kwargs)
File "/<<BUILDDIR>
File "/<<BUILDDIR>
File "/<<BUILDDIR>
result = func(*args, **kwargs)
File "/<<BUILDDIR>
self.rev_id = self.builder.
File "/<<BUILDDIR>
File "/<<BUILDDIR>
result = unbound(self, *args, **kwargs)
File "/<<BUILDDIR>
signature = gpg_strategy.
File "/<<BUILDDIR>
raise errors.
SigningFailed: Failed to GPG sign data with command "[u'gpg', '--clearsign', '-u', u'7D86500B']"
Temporarily moving ~/.bazaar aside works around this.
The test suite should be properly isolated from whatever happens to be in the home directory of the user running it.
Related branches
- Martin Packman: Approve
-
Diff: 19 lines (+2/-1)1 file modifiedbreezy/tests/__init__.py (+2/-1)
Changed in brz: | |
status: | New → Triaged |
importance: | Undecided → Medium |
assignee: | nobody → Jelmer Vernooij (jelmer) |
milestone: | none → 3.0.0 |
status: | Triaged → In Progress |
Changed in brz: | |
status: | In Progress → Fix Released |
Changed in brz: | |
status: | Triaged → Fix Released |
Changed in bzr: | |
assignee: | Vincent Ladeuil (vila) → nobody |
Different parts of the test suite use different sort of isolation.
Thanks for identifying this leak,
This is... a doctest... it's not properly isolated almost by design.
There are way better (and more complete) examples in other tests, starting with branchbuilder tests themselves, this is not worth attempting to teach doctest about isolation ;)
So I'll replace the doctest by better pointers.