Skip to content
#

pytest

Here are 958 public repositories matching this topic...

ods
ods commented Mar 25, 2020

Test file

import logging
import pytest

@pytest.fixture
def fixture():
    logging.warning('Warning in fixture')


def test_nothing(fixture):
    pass

Output with pytest-sugar

$ pytest -r P test.py 
Test session starts (platform: darwin, Python 3.8.2, pytest 5.3.5, pytest-sugar 0.9.2)
rootdir: /Users/ods/work/sugar-dup-log
plugins: sugar-0.9.2
co
h-rueda
h-rueda commented Apr 6, 2020

Could,

Could you add more comments to the code and Readme files so that we can better understand the type of objects and the attributes of the following parameters :

  • report
  • prefix
  • summary
  • postfix
  • cells
  • data

I found them in the following hookers:

  • def pytest_html_report_title(report):
  • def pytest_html_results_summary(prefix, summary, postfix):
  • def pytest_html_results_
anapaulagomes
anapaulagomes commented Mar 21, 2020

To reproduce it, run pytest in this repo:

tests/test_pytest_picked.py: 13 tests with warnings
  /home/ana/workspace/pytest-picked/venv/lib/python3.8/site-packages/pytest-5.4.1-py3.8.egg/_pytest/terminal.py:287: PytestDeprecationWarning: TerminalReporter.writer attribute is deprecated, use TerminalReporter._tw instead at your own risk.
  See https://docs.pytest.org/en/latest/deprecation
nedbat
nedbat commented Mar 30, 2019

The contributing guidelines say, "please ensure the coverage at least stays the same before you submit a pull request," but there is no coverage reporting when running the tests with "tox". Looks like "coverage" was removed from the requirements in 0bdbaa805e5e5c334d35accf1341e3f74fa33d15.

(also, btw: the flake8 tox environment fails because flake8 isn't installed.)

sobrinojulian
sobrinojulian commented Mar 29, 2020

For example:

def main():
    set_python_version()
    # Initialise git repo
    os.system('git init')
    # Install dependencies
    os.system('pipenv install --dev')
    # Setup pre-commit and pre-push hooks
    os.system('pipenv run pre-commit install -t pre-commit')
    os.system('pipenv run pre-commit install -t pre-push')
    print(SUCCESS + "Project successfully initiali

Improve this page

Add a description, image, and links to the pytest topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the pytest topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.