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