summaryrefslogtreecommitdiff
path: root/tests/test_util_pycompat.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-03-07 20:43:25 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-04-29 15:12:39 +0900
commita86346aca6bf99a8920da366caaad7c47809ecce (patch)
tree7aa786e7817f9f3e6a338d06df2f02534d91a4c5 /tests/test_util_pycompat.py
parentaa773cbc88e692df731c78353a1043201bcb9f91 (diff)
downloadsphinx-git-a86346aca6bf99a8920da366caaad7c47809ecce.tar.gz
Remove deprecated features marked as RemovedInSphinx40Warning
Diffstat (limited to 'tests/test_util_pycompat.py')
-rw-r--r--tests/test_util_pycompat.py38
1 files changed, 0 insertions, 38 deletions
diff --git a/tests/test_util_pycompat.py b/tests/test_util_pycompat.py
deleted file mode 100644
index 67e61bb58..000000000
--- a/tests/test_util_pycompat.py
+++ /dev/null
@@ -1,38 +0,0 @@
-"""
- test_util_pycompat
- ~~~~~~~~~~~~~~~~~~
-
- Tests sphinx.util.pycompat functions.
-
- :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
-
-from sphinx.testing.util import strip_escseq
-from sphinx.util import logging
-from sphinx.util.pycompat import execfile_
-
-
-def test_execfile_python2(capsys, app, status, warning, tempdir):
- logging.setup(app, status, warning)
-
- conf_py = tempdir / 'conf.py'
- conf_py.write_bytes(b'print "hello"\n')
- execfile_(conf_py, {})
-
- msg = (
- 'Support for evaluating Python 2 syntax is deprecated '
- 'and will be removed in Sphinx 4.0. '
- 'Convert %s to Python 3 syntax.\n' % conf_py)
- assert msg in strip_escseq(warning.getvalue())
- captured = capsys.readouterr()
- assert captured.out == 'hello\n'
-
-
-def test_execfile(capsys, tempdir):
- conf_py = tempdir / 'conf.py'
- conf_py.write_bytes(b'print("hello")\n')
- execfile_(conf_py, {})
-
- captured = capsys.readouterr()
- assert captured.out == 'hello\n'