Add some basic test coverage of factory.py

This commit is contained in:
Chris Jones 2010-01-14 23:40:02 +00:00
parent 9d5d9a286c
commit 32a3933b6c
2 changed files with 18 additions and 1 deletions

View File

@ -1,7 +1,23 @@
#!/usr/bin/python
# Terminator by Chris Jones <cmsj@tenshu.net>
# GPL v2 only
"""factory.py - Maker of objects"""
"""factory.py - Maker of objects
>>> maker = Factory()
>>> window = maker.make_window()
>>> maker.isinstance(window, 'Window')
True
>>> terminal = maker.make_terminal()
>>> maker.isinstance(terminal, 'Terminal')
True
>>> hpaned = maker.make_hpaned()
>>> maker.isinstance(hpaned, 'HPaned')
True
>>> vpaned = maker.make_vpaned()
>>> maker.isinstance(vpaned, 'VPaned')
True
"""
from borg import Borg
from util import dbg, err

View File

@ -9,6 +9,7 @@ def test_suite():
'plugin',
'testborg',
'cwd',
'factory',
):
suite.addTest(DocTestSuite('terminatorlib.' + name))
return suite