jupyter / notebook

Jupyter Interactive Notebook
https://jupyter-notebook.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
11.74k stars 4.99k forks source link

spelling problem occurs when run notebook test #4994

Open qjtongkai opened 5 years ago

qjtongkai commented 5 years ago

I run test for notebook in my environment and found problem when process test for selenium, notebook extension, etc. It looks like a spelling problem:

notebook/tests/selenium/conftest.py
34 @pytest.fixture(scope='session')
35 def notebook_server():
36     info = {}
37    with TemporaryDirectory() as td:
38         nbdir = info['nbdir'] = pjoin(td, 'notebooks')
39         os.makedirs(pjoin(nbdir, u'sub **∂ir1**', u'sub **∂ir** 1a'))
40        os.makedirs(pjoin(nbdir, u'sub **∂ir2**', u'sub **∂ir** 1b'))

My machine can not decode ' ∂ir' and raise errors. There also are other files which contain this characher. I wonder how the tests passed for other env. Does the '∂' has special meaning? I change it to 'a' to pass these tests.

If '∂' has some special meanings and needs extra setting in hosts please notice me while if not I can submit a patch to fix it.

files contains this character:

notebook/jstest.py
notebook/tests/test_nbextensions.py
notebook/services/contents/tests/test_contents_api.py
notebook/services/contents/tests/test_manager.py
Carreau commented 5 years ago

What is the exact error you get ?

is explicitly an uncommon unicode character that is meant to make sure we properly handle non western languages.

qjtongkai commented 5 years ago

Error occurs when I run test cases: ImportError while loading conftest '/srv/src/notebook/notebook/tests/selenium/conftest.py'. /opt/tljh/user/lib/python3.6/ast.py:35: in parse return compile(source, filename, mode, PyCF_ONLY_AST) E File "/srv/src/notebook/notebook/tests/selenium/conftest.py", line 39 E SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0x88 in position 4: invalid start byte

Is this character for testing non western languages? My host is on language english.

What is the exact error you get ? is explicitly an uncommon unicode character that is meant to make sure we properly handle non western languages.