def test_inline_cell_no_attr_span_set(self): c = Cell('!! 00', True) c.set('n', 'v') self.assertEqual(c.string, '!! n="v" | 00') c = Cell('!! 00', True) c.set('n', '') self.assertEqual(c.string, '!! n | 00')
def test_space_or_quote_at_set_boundary(self): c = Cell('!!n=v|', True) c.set('m', 'w') self.assertEqual(c.string, '!!n=v m="w"|') c = Cell('!! n=v |', True) c.set('m', 'w') self.assertEqual(c.string, '!! n=v m="w" |')
def test_set_overwrite(self): c = Cell('\n! n=v | 00', True) # Set a new value for an existing attribute c.set('n', 'w') # Set a new attribute c.set('n2', 'v2') self.assertEqual(c.string, '\n! n="w" n2="v2" | 00')