awips2/pythonPackages/nose/unit_tests/test_attribute_plugin.py
root 133dc97f67 Initial revision of AWIPS2 11.9.0-7p5
Former-commit-id: 06a8b51d6d [formerly 9f19e3f712 [formerly 64fa9254b946eae7e61bbc3f513b7c3696c4f54f]]
Former-commit-id: 9f19e3f712
Former-commit-id: a02aeb236c
2012-01-06 08:55:05 -06:00

32 lines
No EOL
685 B
Python
Executable file

from nose.tools import eq_
from nose.plugins.attrib import attr
def test_flags():
# @attr('one','two')
def test():
pass
test = attr('one','two')(test)
eq_(test.one, 1)
eq_(test.two, 1)
def test_values():
# @attr(mood="hohum", colors=['red','blue'])
def test():
pass
test = attr(mood="hohum", colors=['red','blue'])(test)
eq_(test.mood, "hohum")
eq_(test.colors, ['red','blue'])
def test_mixed():
# @attr('slow', 'net', role='integration')
def test():
pass
test = attr('slow', 'net', role='integration')(test)
eq_(test.slow, 1)
eq_(test.net, 1)
eq_(test.role, 'integration')