Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ Short version

#. Write a ``changelog`` entry: ``changelog/2574.bugfix.rst``, use issue id number
and one of ``feature``, ``improvement``, ``bugfix``, ``doc``, ``deprecation``,
``breaking``, ``vendor`` or ``trivial`` for the issue type.
``breaking``, or ``vendor`` for the issue type.


#. Unless your change is a trivial or a documentation fix (e.g., a typo or reword of a small section) please
Expand Down Expand Up @@ -305,8 +305,8 @@ Here is a simple overview, with pytest-specific bits:

#. Create a new changelog entry in ``changelog``. The file should be named ``<issueid>.<type>.rst``,
where *issueid* is the number of the issue related to the change and *type* is one of
``feature``, ``improvement``, ``bugfix``, ``doc``, ``deprecation``, ``breaking``, ``vendor``
or ``trivial``. You may skip creating the changelog entry if the change doesn't affect the
``feature``, ``improvement``, ``bugfix``, ``doc``, ``deprecation``, ``breaking``, or ``vendor``.
You may skip creating the changelog entry if the change doesn't affect the
documented behaviour of pytest.

#. Add yourself to ``AUTHORS`` file if not there yet, in alphabetical order.
Expand Down
1 change: 1 addition & 0 deletions changelog/13842.contrib.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improve a few ``py`` tests.
12 changes: 4 additions & 8 deletions testing/_py/test_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,7 @@ def test_visit_norecurse(self, path1):
assert "sampledir" in lst
assert path1.sep.join(["sampledir", "otherfile"]) not in lst

@pytest.mark.parametrize(
"fil",
["*dir", pytest.mark.skip("sys.version_info < (3,6)")(b"*dir")],
)
@pytest.mark.parametrize("fil", ["*dir"])
def test_visit_filterfunc_is_string(self, path1, fil):
lst = []
for i in path1.visit(fil):
Expand Down Expand Up @@ -463,12 +460,11 @@ def test_fspath_func_match_strpath(self, path1):

assert fspath(path1) == path1.strpath

@pytest.mark.skip("sys.version_info < (3,6)")
def test_fspath_open(self, path1):
f = path1.join("opentestfile")
open(f)
f = path1.join("samplefile")
stream = open(f, encoding="utf-8")
stream.close()

@pytest.mark.skip("sys.version_info < (3,6)")
def test_fspath_fsencode(self, path1):
from os import fsencode

Expand Down