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

tests: get rid of py library #469

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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 test/requirements/pypi.in
Expand Up @@ -2,7 +2,7 @@

pytest~=7.4.0
pytest-xdist[psutil,setproctitle]~=3.3.1
pytest-html~=3.2.0
pytest-html~=4.0.0
pytest-rerunfailures~=12.0
pluggy~=1.3.0
ansi2html~=1.8.0
Expand Down
8 changes: 5 additions & 3 deletions test/requirements/pypi.txt
Expand Up @@ -16,6 +16,10 @@ filelock==3.12.3
# via -r pypi.in
iniconfig==2.0.0
# via pytest
jinja2==3.1.2
# via pytest-html
markupsafe==2.1.3
# via jinja2
packaging==23.1
# via
# pytest
Expand All @@ -26,16 +30,14 @@ pluggy==1.3.0
# pytest
psutil==5.9.5
# via pytest-xdist
py==1.11.0
# via pytest-html
pytest==7.4.1
# via
# -r pypi.in
# pytest-html
# pytest-metadata
# pytest-rerunfailures
# pytest-xdist
pytest-html==3.2.0
pytest-html==4.0.0
# via -r pypi.in
pytest-metadata==3.0.0
# via pytest-html
Expand Down
6 changes: 3 additions & 3 deletions test/screenshot.py
Expand Up @@ -77,13 +77,13 @@ def pytest_runtest_makereport(self, item, call):

png_blob = screenshot(self.display)

extra = getattr(report, 'extra', [])
extras = getattr(report, 'extras', [])

extra.append(
extras.append(
pytest_html.extras.png(base64.b64encode(png_blob).decode('ascii'))
)

report.extra = extra
report.extras = extras


def pytest_addoption(parser):
Expand Down
5 changes: 0 additions & 5 deletions test/tox.ini
Expand Up @@ -11,11 +11,6 @@ passenv =

deps = -r requirements.txt

# https://github.com/pytest-dev/pytest/issues/10451
commands_pre =
rm -f {envsitepackagesdir}/py.py
allowlist_externals = rm

commands = python -m pytest -c {toxinidir}/pytest.ini --html=report.html --dist=worksteal {posargs: -n auto --screenshot-failing-only}

suicide_timeout = 10
Expand Down