()
| 232 | |
| 233 | |
| 234 | def test_clear_meta_and_links(): |
| 235 | style = Style.parse("bold red on black link https://example.org") + Style.on( |
| 236 | click="CLICK" |
| 237 | ) |
| 238 | |
| 239 | assert style.meta == {"@click": "CLICK"} |
| 240 | assert style.link == "https://example.org" |
| 241 | assert style.color == Color.parse("red") |
| 242 | assert style.bgcolor == Color.parse("black") |
| 243 | assert style.bold |
| 244 | assert not style.italic |
| 245 | |
| 246 | clear_style = style.clear_meta_and_links() |
| 247 | |
| 248 | assert clear_style.meta == {} |
| 249 | assert clear_style.link == None |
| 250 | assert clear_style.color == Color.parse("red") |
| 251 | assert clear_style.bgcolor == Color.parse("black") |
| 252 | assert clear_style.bold |
| 253 | assert not clear_style.italic |
| 254 | |
| 255 | |
| 256 | def test_clear_meta_and_links_clears_hash(): |
nothing calls this directly
no test coverage detected