()
| 117 | |
| 118 | |
| 119 | def test_copy(): |
| 120 | text = Text() |
| 121 | text.append("Hello", "bold") |
| 122 | text.append(" ") |
| 123 | text.append("World", "italic") |
| 124 | test_copy = text.copy() |
| 125 | assert text == test_copy |
| 126 | assert text is not test_copy |
| 127 | |
| 128 | |
| 129 | def test_rstrip(): |