script tests fail with unspecified output
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Undecided
|
Neil Martinsen-Burrell |
Bug Description
With Martin's changes to bzrlib/
and execution continue." however this is no longer the case. To reproduce:
$ echo "$ bzr init" > /tmp/testscript
$ bzr test-script /tmp/testscript
bzr selftest: /Users/
/Users/
bzr-2.3.0dev3 python-2.6.5 Darwin-
FAIL: script.Test.test_it
Text attachment: log
------------
0.401 creating repository in file://
0.408 creating branch <bzrlib.
0.427 trying to create missing lock '/private/
0.428 opening working tree '/private/
0.447 run bzr: ['init']
0.448 bazaar version: 2.3.0dev3
0.448 bzr arguments: ['init']
0.452 encoding stdout as sys.stdout encoding 'UTF-8'
0.456 bzr-hg: using Mercurial 1.6.3
0.466 creating repository in file://
0.472 creating branch <bzrlib.
0.490 trying to create missing lock '/private/
0.491 opening working tree '/private/
0.504 opening working tree '/private/
0.513 output:
'Created a standalone tree (format: 2a)\n'
0.525 opening working tree '/private/
------------
Text attachment: traceback
------------
Traceback (most recent call last):
File "/Library/
return fn(*args)
File "/Library/
testMethod()
File "/Users/
self.
File "/Users/
return self.script_
File "/Users/
self.
File "/Users/
raise AssertionError(
AssertionError: texts not equal:
+ Created a standalone tree (format: 2a)
in stdout of command ['bzr', 'init']
------------
This change makes many, many falsely failing tests in bzr-colo which is a heavy consumer of script tests, particularly those with unspecified command output.
Related branches
- Vincent Ladeuil: Approve
- Martin Pool: Pending requested
- Poolie: Pending requested
-
Diff: 156 lines (+53/-12)4 files modifiedbzrlib/tests/script.py (+22/-7)
bzrlib/tests/test_script.py (+8/-0)
doc/developers/testing.txt (+19/-5)
doc/en/release-notes/bzr-2.3.txt (+4/-0)
Changed in bzr: | |
assignee: | nobody → Neil Martinsen-Burrell (nmb) |
status: | New → In Progress |
milestone: | none → 2.3b3 |
Changed in bzr: | |
milestone: | 2.3b3 → none |
Changed in bzr: | |
milestone: | none → 2.3b4 |
status: | In Progress → Fix Released |
This was an intentional change, and the documentation should be updated to match.
The problem was that things were easily succeeding accidentally. We generally *do* care about what content is produced. If a given test does not care, I believe it can use:
>...
To say that it can match anything.