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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove usage of pylib in docs #7545

Merged
merged 1 commit into from Jul 27, 2020
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
4 changes: 2 additions & 2 deletions doc/en/example/assertion/global_testmodule_config/conftest.py
@@ -1,8 +1,8 @@
import py
import os.path

import pytest

mydir = py.path.local(__file__).dirpath()
mydir = os.path.dirname(__file__)


def pytest_runtest_setup(item):
Expand Down
10 changes: 5 additions & 5 deletions doc/en/example/assertion/test_failures.py
@@ -1,13 +1,13 @@
import py
import os.path
import shutil

failure_demo = py.path.local(__file__).dirpath("failure_demo.py")
failure_demo = os.path.join(os.path.dirname(__file__), "failure_demo.py")
pytest_plugins = ("pytester",)


def test_failure_demo_fails_properly(testdir):
target = testdir.tmpdir.join(failure_demo.basename)
failure_demo.copy(target)
failure_demo.copy(testdir.tmpdir.join(failure_demo.basename))
target = testdir.tmpdir.join(os.path.basename(failure_demo))
shutil.copy(failure_demo, target)
result = testdir.runpytest(target, syspathinsert=True)
result.stdout.fnmatch_lines(["*44 failed*"])
assert result.ret != 0