Skip to content

Commit

Permalink
Merge pull request #19 from joseph-roitman/pytest6-support
Browse files Browse the repository at this point in the history
Support pytest6.
  • Loading branch information
joseph-roitman authored Aug 3, 2020
2 parents dcfb0c7 + eec59af commit 059dbae
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ In the second example, the developer would simply
Snapshot testing can be used for expressions whose values are strings.
For other types, you should first create a *human readable* textual representation of the value.
For example, to snapshot test a *json-serializable* value, you could either convert it into json
or preferably convert it into the more readable yaml format using `PyYaml`_:
or preferably convert it into the more readable yaml format using `PyYAML`_:

.. code-block:: python
Expand Down
2 changes: 1 addition & 1 deletion pytest_snapshot/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def get_default_snapshot_dir(node):
"""
test_module_dir = node.fspath.dirpath()
test_module = node.fspath.purebasename
if node.originalname is None:
if '[' not in node.name:
test_name = node.name
parametrize_name = None
else:
Expand Down
11 changes: 6 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@
[tox]
envlist =
py27-pytest{3,4}-coverage,
py35-pytest{3,4,5,}-coverage,
py36-pytest{3,4,5,}-coverage,
py37-pytest{3,4,5,}-coverage,
py38-pytest{3,4,5,}-coverage,
pypy3-pytest{3,4,5,}-coverage,
py35-pytest{3,4,5,6,}-coverage,
py36-pytest{3,4,5,6,}-coverage,
py37-pytest{3,4,5,6,}-coverage,
py38-pytest{3,4,5,6,}-coverage,
pypy3-pytest{3,4,5,6,}-coverage,
flake8

[testenv]
deps =
pytest3: pytest >=3, <4
pytest4: pytest >=4, <5
pytest5: pytest >=5, <6
pytest6: pytest >=6, <7
pytest: pytest

coverage: coverage
Expand Down

0 comments on commit 059dbae

Please sign in to comment.