Giter Club home page Giter Club logo

pytest-instafail's Introduction

pytest-instafail

Build Status_

pytest-instafail is a plugin for pytest that shows failures and errors instantly instead of waiting until the end of test session.

Requirements

You will need the following prerequisites in order to use pytest-instafail:

  • Python 3.7+ or PyPy3
  • pytest 5 or newer

Installation

To install pytest-instafail:

$ pip install pytest-instafail

Then run your tests with:

$ pytest --instafail

Resources

pytest-instafail's People

Contributors

blueyed avatar davidszotten avatar graingert avatar hpk42 avatar hugovk avatar jpvanhal avatar kianmeng avatar maratori avatar ronnypfannschmidt avatar the-compiler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pytest-instafail's Issues

Get rid of --instafail commandline argument?

Thanks a lot for this plugin! It probably saved me countless hours of waiting for my testsuite to finish ๐Ÿ™‚

I assume most testsuites with pytest-instafail installed will always want to enable it. This can be done with addopts = --instafail in a pytest.ini.

However, at that point the pytest-instafail plugin needs to be installed for the tests to work at all, which is a bit unfortunate. What do you think about enabling it when installed by default, similar to what e.g. pytest-sugar does? That would avoid this issue, and it's still possible to disable it using pytest's -p no:instafail.

Error with "-p no:terminal"

I have pytest.ini with addopts = --instafail.
I have other python program which must collect list of tests. Simple solution here.
To disable pytest output I use argument -p no:terminal as suggested above.
The result is AttributeError: 'NoneType' object has no attribute 'config'
This happens because there is no terminalreporter plugin and None is returned here

standard_reporter = config.pluginmanager.getplugin('terminalreporter')

Tests fail with py.test 2.6.0

In looking at compatibility between instafail 0.2.0 and py.test 2.6.0, it seems like the former is not compatible with the latter. I get 24 test failures against Python 2.7 and 33 failures when running against Python 3.4 when running tox.

Missing Python wheel

http://pythonwheels.com/

Right now, only the tar.gz file is being distributed on PyPI for pytest-instafail, which isn't that much of an issue, but it does add some time to installing the package.

This package should be compatible with the Wheel format, considering it doesn't appear to have any C dependencies and it is compatible with both Python 2 and 3. As a result, you should only need to generate a universal wheel and then everyone (on all systems) will get the ability to install pytest-instafail with just the wheel, without having to do any extra work.

New release upload?

Would it be possible to cut a new release please?
I am still seeing the PytestDeprecationWarnings that have been fixed in #26.

Thanks!

Show percentage complete when not in verbose mode

When not in verbose mode, pytest shows each test as a single dot, and shows the percentage completed at the end of the line.

If the line of dots is cut short by instafail, the percentage is not known.

If that happens a few times, it can be hard to gauge whether the test run is nearing completion.

instafail and latefail

passing --instafail=andlatefail to show failures as they happen and in a summary report

I have a suite of tests that takes a long time to run, so I like to get feedback on failures early. Also it outputs many tests so once CI does fail I want to see the tracebacks at the end of the log

README should mention it only works with pytest version 2.3+

Because installing this in a virtualenv with a version of pytest 2.2.3 meant bad things happened (partial output included below, but safe to assume having a lower version of py.test already installed made things unhappy I think). The install failed, it wasn't able to cleanly back out, then my original py.test was "corrupted", and to fix it I had to manually delete stuff out of the site-packages (hopefully deleting the 2.3 pytest and not my 2.2.3!).

Installing py.test script to (path)/release/bin

error: (path)/release/bin/py.test: Permission denied

----------------------------------------
  Can't roll back pytest; was not uninstalled
Command (path)/release/bin/python -c "import setuptools;__file__='(path)/release/build/pytest/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-tc50b2-record/install-record.txt --install-headers (path)/release/include/site/python2.7 failed with error code 1 in (path)/release/build/pytest
Storing complete log in (...)/.pip/pip.log

Then:

$py.test tests/unit/formatters/libs/
Exec to gpython at: (path)/release/bin/gpython_opt_off
Traceback (most recent call last):
  File "(path)/release/bin/py.test", line 9, in 
    load_entry_point('pytest==2.2.3', 'console_scripts', 'py.test')()
(...)
  File "(path)/release/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 588, in resolve
    raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (pytest 2.2.3 (/work/gfe-devel-2.0.0/lib/python2.7/site-packages/pytest-2.2.3-py2.7.egg), Requirement.parse('pytest>=2.3'))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.