Commit Graph

27 Commits

Author SHA1 Message Date
Takeshi KOMIYA
9ac06520b9 test: clear SPHINX_TEST_TEMPDIR before testing 2019-02-07 01:28:45 +09:00
Takeshi KOMIYA
ed90306ee5 Show tempdir header on testing (refs: #5902) 2019-02-01 22:36:10 +09:00
Takeshi KOMIYA
d6fc5c9095 Stop to use $SPHINX_TEST_TEMPDIR envvar
At once, we added $SPHINX_TEST_TEMPDIR to keep intermediate files of
testing to investigate the failures.  At present, we've used pytest
as a test runner.  And it keeps temporary directories of last 3
testings.  So this starts to use it instead of $SPHINX_TEST_TEMPDIR.
https://docs.pytest.org/en/latest/tmpdir.html#the-default-base-temporary-directory
2019-01-13 23:50:18 +09:00
Takayuki SHIMIZUKAWA
795b518464
Add PathComparer for testing and fix 2 test failure on Windows. (#5943)
commits are squashed.

* Add PathComparer for testing and fix 2 test failure on Windows.
* fix flake8
* add type information by f2f review. Thanks to @tk0miya!
* fix mypy, flake8 again..
2019-01-13 18:40:35 +09:00
Takeshi KOMIYA
76e9f57c2e Merge branch '1.8' 2019-01-02 16:16:25 +09:00
Takeshi KOMIYA
1b1ebd2c75 A happy new year! 2019-01-02 16:00:30 +09:00
Jon Dufresne
bade33c7e4 Remove unnecessary encoding cookie from Python source files
In Python 3, the default encoding of source files is utf-8. The encoding
cookie is now unnecessary and redundant so remove it. For more details,
see the docs:

https://docs.python.org/3/howto/unicode.html#the-string-type

> The default encoding for Python source code is UTF-8, so you can
> simply include a Unicode character in a string literal ...

Includes a fix for the flake8 header checks to stop expecting an
encoding cookie.
2018-12-16 12:22:12 -08:00
Jon Dufresne
0137b0287a Remove dead code or '.'
The expression `os.path.dirname(__file__)` always evaluates as a truthy
value. The `or '.'` is never evaluated.
2018-11-12 14:31:29 -08:00
Takeshi KOMIYA
b18fe13f55 Drop branches for sys.version_info < (3, 4) 2018-09-22 16:31:07 +09:00
Takeshi KOMIYA
48427ae57a Improve pytest header 2018-08-26 11:28:06 +09:00
Takeshi KOMIYA
f7027049b1 Fix flake8 violations 2018-02-19 23:20:56 +09:00
Takeshi KOMIYA
795ca7a0c9 Fix #4260: autodoc: keyword only argument separator is not disappeared 2018-02-13 02:13:38 +09:00
Takeshi KOMIYA
23533e48b2 Update PYTHONWARNINGS on tox.ini to reduce meaningless warnings 2018-01-06 20:14:20 +09:00
Takeshi KOMIYA
f1f6ca8cc9 Merge branch 'happy_new_year' into master 2018-01-01 01:09:17 +09:00
Takeshi KOMIYA
2426cedb8b A happy new year! 2018-01-01 01:06:58 +09:00
Stephen Finucane
9a3ebaaff5 Resolve warning filter issues
There's an issue with 'pkgutils' and namespace packages. This has been
reported against setuptools [1], but until this is resolved, we simply
need to live with it. Ensure said warnings are filtered from tox too and
remove some unnecessary ones.

[1] https://github.com/pypa/setuptools/issues/1111

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-12-29 13:02:32 +00:00
Stephen Finucane
529c96a3c9 tests: Use 'pytest_sessionstart'
This is the recommended way to do pre-session configuration in pytest if
not using session fixtures [1].

With this, we're able to remove the custom 'test/run.py' script in its
entirety and run 'pytest' like everyone else does. We'll do this
separately to keep things simple.

[1] https://stackoverflow.com/a/12600154/613428

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-12-29 13:02:26 +00:00
Stephen Finucane
c33ecd1f8f tests: Use 'pytest_report_header'
This is the recommended way to print extra headers [1].

[1] https://docs.pytest.org/en/latest/example/simple.html#adding-info-to-test-report-header

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-12-29 13:02:07 +00:00
Stephen Finucane
c8d56236c9 tests: Ignore roots using 'collect_ignore'
This is slightly cleaner than how we're doing this at the moment.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-12-18 20:10:18 +00:00
Stephen Finucane
e243e82723 tests: Ignore tests using 'collect_ignore'
Per the pytest docs [1], this is the preferred way to ignore tests. This
necessitates removing the 'test-async' target as it no longer makes any
sense.

[1] https://docs.pytest.org/en/latest/example/pythoncollection.html

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-12-18 20:10:18 +00:00
shimizukawa
d497d74370 refs #3458: add sphinx.testing that are moved from /tests directory. 2017-05-14 20:47:15 +09:00
Takeshi KOMIYA
6d08efe2dd test: Replace app.buildername by app.builder.name 2017-03-26 17:33:56 +09:00
shimizukawa
b5530629a9 pytest: update by reviewing
* remove 'specific_srcdir' feature
* simplify 'shared_result' feature
* rename 'AppWrapper' into 'SphinxTestAppWrapperForSkipBuilding'
2017-01-09 17:41:47 +09:00
shimizukawa
561abdd164 pytest optimizatoin:
- remote using deprecated decorators
- remove gen_with_app
- remove yield testing
- remove pytest warnings
- refactoring
2017-01-08 15:14:38 +09:00
shimizukawa
89e1df0bba pytest: nits 2017-01-06 23:10:52 +09:00
shimizukawa
ad6d731ecf pytest: remove unused testing feature for a while. 2017-01-05 23:36:36 +09:00
shimizukawa
5b7d237db3 pytest migration 2017-01-04 00:59:30 +09:00