def test_value(self): c = Cell('\n| a ') self.assertEqual(' a ', c.value) self.assertEqual(repr(c), 'Cell(\'\\n| a \')') self.assertEqual(c.attrs, {}) # Use _cached_attrs self.assertEqual(c.attrs, {}) # Inline _header cell c = Cell('|| 01 ', True) self.assertEqual(c.value, ' 01 ') # Inline non-_header cell c = Cell('|| 01 ', False) self.assertEqual(c.value, ' 01 ') # Set a new value c.value = '\na\na' self.assertEqual(c.value, '\na\na')
def test_value(): c = Cell('\n| a ') assert ' a ' == c.value assert repr(c) == 'Cell(\'\\n| a \')' assert c.attrs == {} # Use _cached_attrs assert c.attrs == {} # Inline _header cell c = Cell('|| 01 ', True) assert c.value == ' 01 ' # Inline non-_header cell c = Cell('|| 01 ', False) assert c.value == ' 01 ' # Set a new value c.value = '\na\na' assert c.value == '\na\na'