()
| 77 | |
| 78 | |
| 79 | def test_metastring(): |
| 80 | encoder = MetaStringEncoder(special_char1=".", special_char2="_") |
| 81 | decoder = MetaStringDecoder(special_char1=".", special_char2="_") |
| 82 | |
| 83 | for i in range(1, 128): |
| 84 | try: |
| 85 | string = create_string(i) |
| 86 | metastring = encoder.encode(string) |
| 87 | assert metastring.encoding != Encoding.UTF_8 |
| 88 | assert metastring.original == string |
| 89 | |
| 90 | new_string = decoder.decode(metastring.encoded_data, metastring.encoding) |
| 91 | assert new_string == string |
| 92 | except Exception as e: |
| 93 | pytest.fail(f"Failed at {i} with exception: {str(e)}") |
| 94 | |
| 95 | |
| 96 | def test_encode_empty_string(): |
nothing calls this directly
no test coverage detected