From f5276d85432c386b2e53569ea0588df8e447274e Mon Sep 17 00:00:00 2001 From: messense Date: Tue, 22 Mar 2022 12:32:40 +0800 Subject: [PATCH] Fix some test cases Why do they change? --- bindings/python/src/decoders.rs | 2 +- bindings/python/src/models.rs | 2 +- bindings/python/src/normalizers.rs | 2 +- bindings/python/src/pre_tokenizers.rs | 2 +- bindings/python/src/processors.rs | 2 +- bindings/python/src/trainers.rs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bindings/python/src/decoders.rs b/bindings/python/src/decoders.rs index c38fda890..4d185184c 100644 --- a/bindings/python/src/decoders.rs +++ b/bindings/python/src/decoders.rs @@ -420,7 +420,7 @@ mod test { let py_meta = py_dec.get_as_subtype().unwrap(); let gil = Python::acquire_gil(); assert_eq!( - "tokenizers.decoders.Metaspace", + "Metaspace", py_meta.as_ref(gil.python()).get_type().name().unwrap() ); } diff --git a/bindings/python/src/models.rs b/bindings/python/src/models.rs index f4402eb6a..e529332de 100644 --- a/bindings/python/src/models.rs +++ b/bindings/python/src/models.rs @@ -811,7 +811,7 @@ mod test { let py_bpe = py_model.get_as_subtype().unwrap(); let gil = Python::acquire_gil(); assert_eq!( - "tokenizers.models.BPE", + "BPE", py_bpe.as_ref(gil.python()).get_type().name().unwrap() ); } diff --git a/bindings/python/src/normalizers.rs b/bindings/python/src/normalizers.rs index d448a5aaa..994c62e92 100644 --- a/bindings/python/src/normalizers.rs +++ b/bindings/python/src/normalizers.rs @@ -628,7 +628,7 @@ mod test { let py_nfc = py_norm.get_as_subtype().unwrap(); let gil = Python::acquire_gil(); assert_eq!( - "tokenizers.normalizers.NFC", + "NFC", py_nfc.as_ref(gil.python()).get_type().name().unwrap() ); } diff --git a/bindings/python/src/pre_tokenizers.rs b/bindings/python/src/pre_tokenizers.rs index 872134cdf..b26332a45 100644 --- a/bindings/python/src/pre_tokenizers.rs +++ b/bindings/python/src/pre_tokenizers.rs @@ -706,7 +706,7 @@ mod test { let py_wsp = py_norm.get_as_subtype().unwrap(); let gil = Python::acquire_gil(); assert_eq!( - "tokenizers.pre_tokenizers.Whitespace", + "Whitespace", py_wsp.as_ref(gil.python()).get_type().name().unwrap() ); } diff --git a/bindings/python/src/processors.rs b/bindings/python/src/processors.rs index 5009ff2eb..4e346f7d6 100644 --- a/bindings/python/src/processors.rs +++ b/bindings/python/src/processors.rs @@ -433,7 +433,7 @@ mod test { let py_bert = py_proc.get_as_subtype().unwrap(); let gil = Python::acquire_gil(); assert_eq!( - "tokenizers.processors.BertProcessing", + "BertProcessing", py_bert.as_ref(gil.python()).get_type().name().unwrap() ); } diff --git a/bindings/python/src/trainers.rs b/bindings/python/src/trainers.rs index 848c26f1c..e03700d38 100644 --- a/bindings/python/src/trainers.rs +++ b/bindings/python/src/trainers.rs @@ -868,7 +868,7 @@ mod tests { let py_bpe = py_trainer.get_as_subtype().unwrap(); let gil = Python::acquire_gil(); assert_eq!( - "tokenizers.trainers.BpeTrainer", + "BpeTrainer", py_bpe.as_ref(gil.python()).get_type().name().unwrap() ); }