summaryrefslogtreecommitdiff
path: root/dev-python/tiktoken/files/tiktoken-0.12.0-special-token-roudtrip.patch
blob: ddf0aae48dcc030c6c6797cc16b22d6e8cdf6efe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/tests/test_encoding.py b/tests/test_encoding.py
index b77ca13..7ef65d9 100644
--- a/tests/test_encoding.py
+++ b/tests/test_encoding.py
@@ -152,7 +152,7 @@ def test_basic_roundtrip(make_enc):
 def test_hyp_roundtrip(make_enc: Callable[[], tiktoken.Encoding], text):
     enc = make_enc()
 
-    assert text == enc.decode(enc.encode(text))
+    assert text == enc.decode(enc.encode(text, allowed_special="all"))
 
 
 @pytest.mark.parametrize("make_enc", ENCODING_FACTORIES)