diff --git a/terminatorlib/borg.py b/terminatorlib/borg.py index 3e4233cf..ec9d3770 100755 --- a/terminatorlib/borg.py +++ b/terminatorlib/borg.py @@ -100,7 +100,8 @@ if __name__ == '__main__': if not self.attribute: self.attribute = 1 + import sys import doctest (failed, attempted) = doctest.testmod() print "%d/%d tests failed" % (failed, attempted) - + sys.exit(failed) diff --git a/terminatorlib/config.py b/terminatorlib/config.py index 0d20ee1a..c81470f9 100755 --- a/terminatorlib/config.py +++ b/terminatorlib/config.py @@ -427,6 +427,8 @@ class ConfigBase(Borg): return(True) if __name__ == '__main__': + import sys import doctest (failed, attempted) = doctest.testmod() print "%d/%d tests failed" % (failed, attempted) + sys.exit(failed) diff --git a/terminatorlib/plugin.py b/terminatorlib/plugin.py index 7c3d1fdf..d664f86b 100755 --- a/terminatorlib/plugin.py +++ b/terminatorlib/plugin.py @@ -106,8 +106,9 @@ for %s' % (len(self.instances), capability)) return(self.instances) if __name__ == '__main__': + import sys import doctest sys.path.insert(0, 'plugins') (failed, attempted) = doctest.testmod() print "%d/%d tests failed" % (failed, attempted) - + sys.exit(failed)