diff options
Diffstat (limited to 'grc/tests/test_block_flags.py')
-rw-r--r-- | grc/tests/test_block_flags.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/grc/tests/test_block_flags.py b/grc/tests/test_block_flags.py new file mode 100644 index 0000000000..9eecaf20d7 --- /dev/null +++ b/grc/tests/test_block_flags.py @@ -0,0 +1,26 @@ + +from grc.core.blocks._flags import Flags + + +def test_simple(): + assert 'test' in Flags('_test_') + + +def test_deprecated(): + assert Flags.DEPRECATED == 'deprecated' + assert Flags('this is deprecated').deprecated is True + + +def test_extend(): + f = Flags('a') + f += 'b' + assert isinstance(f, Flags) + f += u'b' + assert isinstance(f, Flags) + f = Flags(u'a') + f += 'b' + assert isinstance(f, Flags) + f += u'b' + assert isinstance(f, Flags) + + assert str(f) == 'abb' |