From 4f905ac9e6e75975acbda7ad943751da07c409ec Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Mon, 30 Sep 2019 18:45:30 +0200 Subject: [PATCH] Add test for ASCII filenames (#4345) --- spacy/tests/test_misc.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spacy/tests/test_misc.py b/spacy/tests/test_misc.py index a0cbd0ac7..a033b6dd0 100644 --- a/spacy/tests/test_misc.py +++ b/spacy/tests/test_misc.py @@ -120,3 +120,12 @@ def test_create_symlink_windows( symlink_to(symlink, symlink_target) assert not symlink.exists() + + +def test_ascii_filenames(): + """Test that all filenames in the project are ASCII. + See: https://twitter.com/_inesmontani/status/1177941471632211968 + """ + root = Path(__file__).parent.parent + for path in root.glob("**/*"): + assert all(ord(c) < 128 for c in path.name), path.name