call sys.exit() with doctest failure results
This commit is contained in:
parent
a13581a4c8
commit
8141a3496d
|
@ -100,7 +100,8 @@ if __name__ == '__main__':
|
||||||
if not self.attribute:
|
if not self.attribute:
|
||||||
self.attribute = 1
|
self.attribute = 1
|
||||||
|
|
||||||
|
import sys
|
||||||
import doctest
|
import doctest
|
||||||
(failed, attempted) = doctest.testmod()
|
(failed, attempted) = doctest.testmod()
|
||||||
print "%d/%d tests failed" % (failed, attempted)
|
print "%d/%d tests failed" % (failed, attempted)
|
||||||
|
sys.exit(failed)
|
||||||
|
|
|
@ -427,6 +427,8 @@ class ConfigBase(Borg):
|
||||||
return(True)
|
return(True)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
import sys
|
||||||
import doctest
|
import doctest
|
||||||
(failed, attempted) = doctest.testmod()
|
(failed, attempted) = doctest.testmod()
|
||||||
print "%d/%d tests failed" % (failed, attempted)
|
print "%d/%d tests failed" % (failed, attempted)
|
||||||
|
sys.exit(failed)
|
||||||
|
|
|
@ -106,8 +106,9 @@ for %s' % (len(self.instances), capability))
|
||||||
return(self.instances)
|
return(self.instances)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
import sys
|
||||||
import doctest
|
import doctest
|
||||||
sys.path.insert(0, 'plugins')
|
sys.path.insert(0, 'plugins')
|
||||||
(failed, attempted) = doctest.testmod()
|
(failed, attempted) = doctest.testmod()
|
||||||
print "%d/%d tests failed" % (failed, attempted)
|
print "%d/%d tests failed" % (failed, attempted)
|
||||||
|
sys.exit(failed)
|
||||||
|
|
Loading…
Reference in New Issue