awips2/pythonPackages/nose/functional_tests/test_result.py
root 06a8b51d6d Initial revision of AWIPS2 11.9.0-7p5
Former-commit-id: 64fa9254b946eae7e61bbc3f513b7c3696c4f54f
2012-01-06 08:55:05 -06:00

32 lines
845 B
Python
Executable file

import os
import sys
import unittest
from cStringIO import StringIO
from nose.config import Config
from nose.core import TestProgram
from nose.plugins.manager import PluginManager
support = os.path.join(os.path.dirname(__file__), 'support')
class TestResultSummary(unittest.TestCase):
def test_with_todo_plugin(self):
pkpath = os.path.join(support, 'todo')
sys.path.insert(0, pkpath)
from todoplug import TodoPlugin
stream = StringIO()
config = Config(stream=stream,
plugins=PluginManager([TodoPlugin()]))
TestProgram(argv=['t', '--with-todo', pkpath],
config=config, exit=False)
out = stream.getvalue()
print out
self.assert_('FAILED (TODO=1)' in out)
if __name__ == '__main__':
unittest.main()