mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-02 03:06:41 +00:00
trial_figleaf.py: make our figleaf code compatible with both Twisted-8.x and Twisted-2.5.x
This commit is contained in:
parent
5578559b85
commit
06dae8fd67
@ -67,21 +67,35 @@ class FigleafReporter(TreeReporter):
|
|||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
TreeReporter.__init__(self, *args, **kwargs)
|
TreeReporter.__init__(self, *args, **kwargs)
|
||||||
|
|
||||||
def printSummary(self):
|
def stop_figleaf(self):
|
||||||
figleaf.stop()
|
figleaf.stop()
|
||||||
figleaf.write_coverage(".figleaf")
|
figleaf.write_coverage(".figleaf")
|
||||||
print "Figleaf results written to .figleaf"
|
print "Figleaf results written to .figleaf"
|
||||||
|
def printSummary(self):
|
||||||
|
# for twisted-2.5.x
|
||||||
|
self.stop_figleaf()
|
||||||
return TreeReporter.printSummary(self)
|
return TreeReporter.printSummary(self)
|
||||||
|
def done(self):
|
||||||
|
# for twisted-8.x
|
||||||
|
self.stop_figleaf()
|
||||||
|
return TreeReporter.done(self)
|
||||||
|
|
||||||
class FigleafTextReporter(VerboseTextReporter):
|
class FigleafTextReporter(VerboseTextReporter):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
VerboseTextReporter.__init__(self, *args, **kwargs)
|
VerboseTextReporter.__init__(self, *args, **kwargs)
|
||||||
|
|
||||||
def printSummary(self):
|
def stop_figleaf(self):
|
||||||
figleaf.stop()
|
figleaf.stop()
|
||||||
figleaf.write_coverage(".figleaf")
|
figleaf.write_coverage(".figleaf")
|
||||||
print "Figleaf results written to .figleaf"
|
print "Figleaf results written to .figleaf"
|
||||||
|
def printSummary(self):
|
||||||
|
# for twisted-2.5.x
|
||||||
|
self.stop_figleaf()
|
||||||
return VerboseTextReporter.printSummary(self)
|
return VerboseTextReporter.printSummary(self)
|
||||||
|
def done(self):
|
||||||
|
# for twisted-8.x
|
||||||
|
self.stop_figleaf()
|
||||||
|
return VerboseTextReporter.done(self)
|
||||||
|
|
||||||
class not_FigleafReporter(object):
|
class not_FigleafReporter(object):
|
||||||
# this class, used as a reporter on a fully-passing test suite, doesn't
|
# this class, used as a reporter on a fully-passing test suite, doesn't
|
||||||
|
Loading…
Reference in New Issue
Block a user