File tree 2 files changed +10
-3
lines changed
2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -90,8 +90,16 @@ def _getrsyncdirs(self):
90
90
import pytest
91
91
import _pytest
92
92
93
- pytestpath = pytest .__file__ .rstrip ("co" )
94
- pytestdir = py .path .local (_pytest .__file__ ).dirpath ()
93
+ def get_dir (p ):
94
+ """Return the directory path if p is a package or the path to the .py file otherwise."""
95
+ stripped = p .rstrip ("co" )
96
+ if os .path .basename (stripped ) == "__init__.py" :
97
+ return os .path .dirname (p )
98
+ else :
99
+ return stripped
100
+
101
+ pytestpath = get_dir (pytest .__file__ )
102
+ pytestdir = get_dir (_pytest .__file__ )
95
103
config = self .config
96
104
candidates = [py ._pydir , pytestpath , pytestdir ]
97
105
candidates += config .option .rsyncdir
Original file line number Diff line number Diff line change @@ -189,7 +189,6 @@ def test_crash():
189
189
)
190
190
assert result .ret == 1
191
191
192
- @pytest .mark .xfail (reason = "#527: Ignore Python 3.8 failure for the time being" )
193
192
def test_distribution_rsyncdirs_example (self , testdir , monkeypatch ):
194
193
# use a custom plugin that has a custom command-line option to ensure
195
194
# this is propagated to workers (see #491)
You can’t perform that action at this time.
0 commit comments