Fix failing test on Windows Platform (#11589)

* add separator for windows

* fixes test_is_copy_consistent on Windows

* fixing writing encoding issue on extended test (for Windows)

* resolving comments
This commit is contained in:
Keren Fuentes
2021-05-20 16:54:23 -07:00
committed by GitHub
parent f4a0d6ff86
commit 223943872e
3 changed files with 3 additions and 3 deletions

View File

@@ -231,7 +231,7 @@ class Wav2Vec2TokenizerTest(unittest.TestCase):
tokenizer_files = tokenizer.save_pretrained(tmpdirname2)
self.assertSequenceEqual(
sorted(tuple(VOCAB_FILES_NAMES.values()) + ("special_tokens_map.json", "added_tokens.json")),
sorted(tuple(x.split("/")[-1] for x in tokenizer_files)),
sorted(tuple(x.split(os.path.sep)[-1] for x in tokenizer_files)),
)
# Checks everything loads correctly in the same way