Browse Source

Fixed bug, where if multiple tests using one diff file, and one test

failed, subsequent tests failed on assertion errors.
main
David Robertson 21 years ago
parent
commit
a85a22dfa2
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      test/utils.py

+ 7
- 1
test/utils.py View File

@@ -167,7 +167,13 @@ class TestDiff:
for cexpr in self.expectedFailures: for cexpr in self.expectedFailures:
origLine = cexpr.sub('', origLine) origLine = cexpr.sub('', origLine)
testLine = cexpr.sub('', testLine) testLine = cexpr.sub('', testLine)
self.testInst.failUnlessEqual(origLine, testLine)
if origLine != testLine: # fails
# advance test file to next test
line = origLine
while line and line != self.divider:
line = self.origStrFile.readline()
self.testInst.failUnlessEqual(origLine, testLine)

else: # write new test file else: # write new test file
for line in testStrFile: for line in testStrFile:
self.dataFile.write(line) self.dataFile.write(line)


Loading…
Cancel
Save