Commit Graph

77 Commits

Author SHA1 Message Date
Anthony Sottile b135f5af8d Preparing release version 5.1.1 2019-08-20 11:30:36 -07:00
Bruno Oliveira eaf7ce9a99 Preparing release version 5.1.0 2019-08-15 20:00:09 -04:00
Bruno Oliveira 2f065a555f Merge remote-tracking branch 'upstream/master' into release-5.1.0 2019-08-09 12:36:19 -03:00
boris 78de9d4677 replace implicit code tag with colon .replace("::\n\n.. code-block", ":\n\n.. code-block") 2019-08-06 16:20:06 -07:00
boris 23a0b532db Revert "remove implicit code tags .replace("::\n\n.. code-block", "\n\n.. code-block")"
This reverts commit 9fce0bdd88.
2019-08-06 16:18:06 -07:00
boris 9fce0bdd88 remove implicit code tags .replace("::\n\n.. code-block", "\n\n.. code-block") 2019-08-06 15:46:57 -07:00
boris 5f95dce956 ran blacken-docs 2019-08-06 13:34:58 -07:00
boris 7f90e74e02 label code blocks 2019-08-06 13:25:54 -07:00
Bruno Oliveira 666acc9b7a
doctest: Add +NUMBER option to ignore irrelevant floating-point… (#5576)
doctest: Add +NUMBER option to ignore irrelevant floating-point differences
2019-07-11 07:25:37 -03:00
David Röthlisberger a740ef2036 docs: Document doctest +NUMBER limitation with strings
Also added an "xfail" testcase for the same.
2019-07-11 10:06:57 +01:00
David Röthlisberger 2a23fdab9f docs: Tidy up doctest options section
* Move the parts about "how to configure it" (pytest.ini vs. inline
  comment) together.
* Move `--doctest-continue-on-failure` into its own sub-heading, as it
  isn't related to the doctest optionflags.
2019-07-08 17:07:58 +01:00
David Röthlisberger aaa7e837cc doctest: Add +NUMBER option to ignore irrelevant floating-point differences
When enabled, floating-point numbers only need to match as far as the
precision you have written in the expected doctest output. This avoids
false positives caused by limited floating-point precision, like this:

    Expected:
        0.233
    Got:
        0.23300000000000001

This is inspired by Sébastien Boisgérault's [numtest] but the
implementation is a bit different:

* This implementation edits the literals that are in the "got"
  string (the actual output from the expression being tested), and then
  proceeds to compare the strings literally. This is similar to pytest's
  existing ALLOW_UNICODE and ALLOW_BYTES implementation.

* This implementation only compares floats against floats, not ints
  against floats. That is, the following doctest will fail with pytest
  whereas it would pass with numtest:

      >>> math.py  # doctest: +NUMBER
      3

  This behaviour should be less surprising (less false negatives) when
  you enable NUMBER globally in pytest.ini.

Advantages of this implementation compared to numtest:

* Doesn't require `import numtest` at the top level of the file.
* Works with pytest (if you try to use pytest & numtest together, pytest
  raises "TypeError: unbound method check_output() must be called with
  NumTestOutputChecker instance as first argument (got
  LiteralsOutputChecker instance instead)").
* Works with Python 3.

[numtest]: https://github.com/boisgera/numtest
2019-07-08 17:07:58 +01:00
Bruno Oliveira bb29f31d22 Preparing release version 5.0.1 2019-07-04 20:01:16 -04:00
Bruno Oliveira e943aff995 Update blurb about Sybil 2019-04-28 20:01:22 -03:00
Bruno Oliveira f6ab6d71ad Run regendoc 2019-04-28 12:17:15 -03:00
Bruno Oliveira 67755d67fb Review doctest docs
* Add pytest.skip() example
* Add blurb about Sybil
* Create a subsection for doctest-options
* Create a subsection for pytest-specific features
2019-04-28 12:17:15 -03:00
Bruno Oliveira 006dc30476 Preparing release version 4.4.1 2019-04-15 14:24:17 +00:00
Daniel Hahler befc8a3f10 Update via https://github.com/pytest-dev/regendoc/pull/8 2019-04-03 22:08:44 +02:00
Grygorii Iermolenko 5cf58a9ae9 Revert '$' changes to not trigger regendoc 2019-02-15 14:09:37 +02:00
Grygorii Iermolenko 799bcccd1b Fix sphinx code-block types (syntax highlighting) in two docs 2019-02-13 17:08:49 +02:00
Bruno Oliveira fa979a4290 Preparing release version 4.2.0 2019-01-30 14:25:38 -02:00
Tomer Keren cb52d17d07 Document doctest fixture pitfalls 2018-12-05 11:25:52 +02:00
Anthony Sottile 7015801377 Highlight docs with pygments-pytest 2018-11-23 22:01:30 -08:00
Bruno Oliveira 16b15af624 Preparing release version 4.0.1 2018-11-23 20:09:57 +00:00
Ronny Pfannschmidt 86fc31db8d apply most other hooks and opt out of black reformating 2018-05-23 16:45:58 +02:00
Ronny Pfannschmidt 3b9e063fe8 fix line endings 2018-05-23 16:45:23 +02:00
Bruno Oliveira 1fff81e21d Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2018-03-16 18:15:28 -03:00
Bruno Oliveira 70f93263e9 Add reference docs to doctest_namespace 2018-03-06 20:41:19 -03:00
William Lee c21eb72924 Added documentation for the continue-on-failure flag 2018-02-23 22:42:22 -06:00
Pierre-Alexandre Fonta 554cb8d09c
Reword strange sentence on doctest flags 2018-01-04 14:47:05 +01:00
Bruno Oliveira e0d236c031 Remove gendoc normalization for '=' and '_' headers
Using the default for non-atty terminals (80) so the new
progress indicator aligns correctly.
2017-11-23 15:33:41 +00:00
Bruno Oliveira b63f6770a1 Preparing release version 3.1.3 2017-07-03 23:29:13 +00:00
Ronny Pfannschmidt 03753ca201 intermediate state after attempt with the plain env, DONT MERGE 2017-05-13 13:25:52 +02:00
Ronny Pfannschmidt d1e44d16e7 regenerate docs from the pytest env 2017-05-12 22:51:20 +02:00
Ronny Pfannschmidt f1c4e2c032 regendoc: reduce version noise by replacing minor/patch with placeholders 2017-05-12 22:17:40 +02:00
Bruno Oliveira 6c9011c12f Merge branch 'master' into merge-master-into-features-post-3.0.7 2017-03-14 18:10:23 -03:00
Bruno Oliveira d58780f9a6 Update regendoc 2017-03-13 18:41:20 -04:00
Ronny Pfannschmidt 713bdc1f9f merge master into features 2017-01-26 12:00:52 +01:00
Ronny Pfannschmidt 4d0c635252 regendoc 2017-01-22 18:44:30 +01:00
Bruno Oliveira 402fbe503a Merge branch 'master' into merge-master-into-features 2016-12-27 23:31:26 -02:00
Bruno Oliveira f592c7746a Regendocs for 3.0.5 2016-12-05 07:22:06 -05:00
Wheerd 2edfc805af Added "versionadded" for doctest_encoding ini option to docs. 2016-11-30 18:01:00 +01:00
Manuel Krebber b7fb9fac91 Fixed the documentation for doctest_encoding. 2016-11-30 14:17:54 +01:00
Manuel Krebber ed977513ec Added a console option to specify the encoding to use for doctest files. Defaults to UTF-8. 2016-11-29 12:29:14 +01:00
Bruno Oliveira ab274299fe Regen doc for 3.0.4 2016-11-09 16:44:58 -05:00
Bruno Oliveira 41d3b3f4f9 Regendoc for version 3.0.3 2016-09-28 16:36:15 -04:00
Bruno Oliveira d512e7f26b Run regendoc for 3.0.2 release 2016-08-31 20:32:05 -04:00
Bruno Oliveira 519f02b014 docs warnings as errors and initial page similar to README
* Changed "index" to be more similar to the README (#1708).
* Fixes numerous issues like missing documents, syntax errors, etc (#1829, #432).
* Mention all docs in "contents.rst" so it's easier for users to locate (#1112).
* Add doc generation and checking to Travis and AppVeyor, to avoid re-introducing errors.

Fixes #432, Fixes #1112, Fixes #1708, Fixes #1829
2016-08-26 17:47:18 -03:00
Bruno Oliveira 49fc4e5e4c Changes for 3.0.1 release 2016-08-23 18:15:43 -04:00
Bruno Oliveira 946466abf4 Run regen-docs for pytest 3.0 2016-08-01 20:09:35 -04:00