Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃И TESTS: Use pytest-param-files #496

Merged
merged 2 commits into from Jan 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Expand Up @@ -84,7 +84,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install .
pip install pytest~=6.2 docutils==${{ matrix.docutils-version }}
pip install pytest~=6.2 pytest-param-files~=0.2.2 docutils==${{ matrix.docutils-version }}
- name: ensure sphinx is not installed
run: |
python -c "\
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Expand Up @@ -79,6 +79,7 @@ testing =
pytest>=6,<7
pytest-cov
pytest-regressions
pytest-param-files~=0.2.2

[flake8]
max-line-length = 100
Expand Down
63 changes: 31 additions & 32 deletions tests/test_renderers/fixtures/docutil_directives.md
@@ -1,5 +1,5 @@
--------------------------------
attention (`docutils.parsers.rst.directives.admonitions.Attention`):
[attention] (`docutils.parsers.rst.directives.admonitions.Attention`):
.
```{attention}

Expand All @@ -13,7 +13,7 @@ a
.

--------------------------------
caution (`docutils.parsers.rst.directives.admonitions.Caution`):
[caution] (`docutils.parsers.rst.directives.admonitions.Caution`):
.
```{caution}

Expand All @@ -27,7 +27,7 @@ a
.

--------------------------------
danger (`docutils.parsers.rst.directives.admonitions.Danger`):
[danger] (`docutils.parsers.rst.directives.admonitions.Danger`):
.
```{danger}

Expand All @@ -41,7 +41,7 @@ a
.

--------------------------------
error (`docutils.parsers.rst.directives.admonitions.Error`):
[error] (`docutils.parsers.rst.directives.admonitions.Error`):
.
```{error}

Expand All @@ -55,7 +55,7 @@ a
.

--------------------------------
important (`docutils.parsers.rst.directives.admonitions.Important`):
[important] (`docutils.parsers.rst.directives.admonitions.Important`):
.
```{important}

Expand All @@ -69,7 +69,7 @@ a
.

--------------------------------
note (`docutils.parsers.rst.directives.admonitions.Note`):
[note] (`docutils.parsers.rst.directives.admonitions.Note`):
.
```{note}

Expand All @@ -83,7 +83,7 @@ a
.

--------------------------------
tip (`docutils.parsers.rst.directives.admonitions.Tip`):
[tip] (`docutils.parsers.rst.directives.admonitions.Tip`):
.
```{tip}

Expand All @@ -97,7 +97,7 @@ a
.

--------------------------------
hint (`docutils.parsers.rst.directives.admonitions.Hint`):
[hint] (`docutils.parsers.rst.directives.admonitions.Hint`):
.
```{hint}

Expand All @@ -111,7 +111,7 @@ a
.

--------------------------------
warning (`docutils.parsers.rst.directives.admonitions.Warning`):
[warning] (`docutils.parsers.rst.directives.admonitions.Warning`):
.
```{warning}

Expand All @@ -125,7 +125,7 @@ a
.

--------------------------------
admonition (`docutils.parsers.rst.directives.admonitions.Admonition`):
[admonition] (`docutils.parsers.rst.directives.admonitions.Admonition`):
.
```{admonition} myclass

Expand All @@ -141,7 +141,7 @@ a
.

--------------------------------
sidebar (`docutils.parsers.rst.directives.body.Sidebar`):
[sidebar] (`docutils.parsers.rst.directives.body.Sidebar`):
.
```{sidebar} sidebar title

Expand All @@ -157,7 +157,7 @@ a
.

--------------------------------
topic (`docutils.parsers.rst.directives.body.Topic`):
[topic] (`docutils.parsers.rst.directives.body.Topic`):
.
```{topic} Topic Title

Expand All @@ -173,8 +173,7 @@ a
.

--------------------------------
line-block (`docutils.parsers.rst.directives.body.LineBlock`):
SKIP: MockingError: MockState has not yet implemented attribute 'nest_line_block_lines'
[line-block] (`docutils.parsers.rst.directives.body.LineBlock`) SKIP: MockingError: MockState has not yet implemented attribute 'nest_line_block_lines'
.
```{line-block}

Expand All @@ -185,7 +184,7 @@ SKIP: MockingError: MockState has not yet implemented attribute 'nest_line_block
.

--------------------------------
parsed-literal (`docutils.parsers.rst.directives.body.ParsedLiteral`):
[parsed-literal] (`docutils.parsers.rst.directives.body.ParsedLiteral`):
.
```{parsed-literal}

Expand All @@ -198,7 +197,7 @@ a
.

--------------------------------
rubric (`docutils.parsers.rst.directives.body.Rubric`):
[rubric] (`docutils.parsers.rst.directives.body.Rubric`):
.
```{rubric} Rubric Title
```
Expand All @@ -209,7 +208,7 @@ rubric (`docutils.parsers.rst.directives.body.Rubric`):
.

--------------------------------
epigraph (`docutils.parsers.rst.directives.body.Epigraph`):
[epigraph] (`docutils.parsers.rst.directives.body.Epigraph`):
.
```{epigraph}

Expand All @@ -227,7 +226,7 @@ a
.

--------------------------------
highlights (`docutils.parsers.rst.directives.body.Highlights`):
[highlights] (`docutils.parsers.rst.directives.body.Highlights`):
.
```{highlights}

Expand All @@ -245,7 +244,7 @@ a
.

--------------------------------
pull-quote (`docutils.parsers.rst.directives.body.PullQuote`):
[pull-quote] (`docutils.parsers.rst.directives.body.PullQuote`):
.
```{pull-quote}

Expand All @@ -263,7 +262,7 @@ a
.

--------------------------------
compound (`docutils.parsers.rst.directives.body.Compound`):
[compound] (`docutils.parsers.rst.directives.body.Compound`):
.
```{compound}

Expand All @@ -277,7 +276,7 @@ a
.

--------------------------------
container (`docutils.parsers.rst.directives.body.Container`):
[container] (`docutils.parsers.rst.directives.body.Container`):
.
```{container}

Expand All @@ -291,7 +290,7 @@ a
.

--------------------------------
image (`docutils.parsers.rst.directives.images.Image`):
[image] (`docutils.parsers.rst.directives.images.Image`):
.
```{image} path/to/image
:alt: abc
Expand All @@ -303,7 +302,7 @@ image (`docutils.parsers.rst.directives.images.Image`):
.

--------------------------------
raw (`docutils.parsers.rst.directives.misc.Raw`):
[raw] (`docutils.parsers.rst.directives.misc.Raw`):
.
```{raw} raw

Expand All @@ -316,7 +315,7 @@ a
.

--------------------------------
class (`docutils.parsers.rst.directives.misc.Class`):
[class] (`docutils.parsers.rst.directives.misc.Class`):
.
```{class} myclass

Expand All @@ -329,7 +328,7 @@ a
.

--------------------------------
role (`docutils.parsers.rst.directives.misc.Role`) + raw (`docutils.parsers.rst.roles.raw_role`):
[role] (`docutils.parsers.rst.directives.misc.Role`) + raw (`docutils.parsers.rst.roles.raw_role`):
.
```{role} raw-latex(raw)
:format: latex
Expand All @@ -344,7 +343,7 @@ role (`docutils.parsers.rst.directives.misc.Role`) + raw (`docutils.parsers.rst.
.

--------------------------------
title (`docutils.parsers.rst.directives.misc.Title`):
[title] (`docutils.parsers.rst.directives.misc.Title`):
.
```{title} title
```
Expand All @@ -353,7 +352,7 @@ title (`docutils.parsers.rst.directives.misc.Title`):
.

--------------------------------
restructuredtext-test-directive (`docutils.parsers.rst.directives.misc.TestDirective`):
[restructuredtext-test-directive] (`docutils.parsers.rst.directives.misc.TestDirective`):
.
```{restructuredtext-test-directive}
```
Expand All @@ -365,7 +364,7 @@ restructuredtext-test-directive (`docutils.parsers.rst.directives.misc.TestDirec
.

--------------------------------
contents (`docutils.parsers.rst.directives.parts.Contents`):
[contents] (`docutils.parsers.rst.directives.parts.Contents`):
.
```{contents} Contents
```
Expand All @@ -381,7 +380,7 @@ contents (`docutils.parsers.rst.directives.parts.Contents`):
.

--------------------------------
sectnum (`docutils.parsers.rst.directives.parts.Sectnum`):
[sectnum] (`docutils.parsers.rst.directives.parts.Sectnum`):
.
```{sectnum}
```
Expand All @@ -394,7 +393,7 @@ sectnum (`docutils.parsers.rst.directives.parts.Sectnum`):
.

--------------------------------
header (`docutils.parsers.rst.directives.parts.Header`):
[header] (`docutils.parsers.rst.directives.parts.Header`):
.
```{header}

Expand All @@ -409,7 +408,7 @@ a
.

--------------------------------
footer (`docutils.parsers.rst.directives.parts.Footer`):
[footer] (`docutils.parsers.rst.directives.parts.Footer`):
.
```{footer}

Expand All @@ -424,7 +423,7 @@ a
.

--------------------------------
target-notes (`docutils.parsers.rst.directives.references.TargetNotes`):
[target-notes] (`docutils.parsers.rst.directives.references.TargetNotes`):
.
```{target-notes}
```
Expand Down