Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (15 sloc) 590 Bytes
import unittest
from import expand_arrows, has_dangling_quote
class TestCategoryOperation(unittest.TestCase):
def test_transition_expansion(self):
test_line = "foo -> bar"
self.assertEqual("transition (pattern foo) (action bar)", expand_arrows(test_line))
def test_quote_imbalance(self):
For instance, if there is a line with three quote characters, it probably needs to
be considered multi-line. Or there is a typo.
test_line = '"foo" -> "bar '
self.assertTrue( has_dangling_quote(test_line))
if __name__ == '__main__':