diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-12-27 22:24:42 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-27 22:24:42 +0900 |
commit | 858d5ffc5ad3bd4239b7c538d579d29ecbc67a38 (patch) | |
tree | a01e02072e8d41032e3b527040128241f7ff4b82 /tests/test_pycode.py | |
parent | 402d0114b1975d6d2c375efd398db34d39466cb3 (diff) | |
parent | c8074b4a5dd7a50a4beaa268f71556ad4c97de1e (diff) | |
download | sphinx-git-858d5ffc5ad3bd4239b7c538d579d29ecbc67a38.tar.gz |
Merge pull request #6928 from tk0miya/deprecate_detect_encoding
Deprecate sphinx.util:detect_encoding()
Diffstat (limited to 'tests/test_pycode.py')
-rw-r--r-- | tests/test_pycode.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/test_pycode.py b/tests/test_pycode.py index be61d9efb..458e813f6 100644 --- a/tests/test_pycode.py +++ b/tests/test_pycode.py @@ -32,14 +32,12 @@ def test_ModuleAnalyzer_for_string(): analyzer = ModuleAnalyzer.for_string('print("Hello world")', 'module_name') assert analyzer.modname == 'module_name' assert analyzer.srcname == '<string>' - assert analyzer.encoding is None def test_ModuleAnalyzer_for_file(): analyzer = ModuleAnalyzer.for_string(SPHINX_MODULE_PATH, 'sphinx') assert analyzer.modname == 'sphinx' assert analyzer.srcname == '<string>' - assert analyzer.encoding is None def test_ModuleAnalyzer_for_module(rootdir): @@ -47,8 +45,7 @@ def test_ModuleAnalyzer_for_module(rootdir): assert analyzer.modname == 'sphinx' assert analyzer.srcname in (SPHINX_MODULE_PATH, os.path.abspath(SPHINX_MODULE_PATH)) - # source should be loaded via native loader, so don`t know file enconding - assert analyzer.encoding == None + path = rootdir / 'test-pycode' sys.path.insert(0, path) try: @@ -57,7 +54,6 @@ def test_ModuleAnalyzer_for_module(rootdir): assert docs == {('', 'X'): ['It MUST look like X="\u0425"', '']} finally: sys.path.pop(0) - def test_ModuleAnalyzer_for_file_in_egg(rootdir): |