Giter Club home page Giter Club logo

pytest-pspec's People

Contributors

gwthm-in avatar kondratyev-nv avatar ropdebee 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

Watchers

 avatar  avatar  avatar  avatar

pytest-pspec's Issues

Only use the first line of the docstring

I sometimes have pretty long docstrings explaining what the test does / why it was added. For the output, I would only want the first line of such long docstrings to be used (the "summary line").

Please note that the first line might be empty ... so technically the second line. The first line which has more than just whitespace.

(PS: Awesome plugin!)

How it looks like at the moment

For pypdf, executed as pytest tests/test_xmp.py --pspec:

image

Support for parameterization

Really like the clarity this plugin provides. I did notice that when running tests with parametrization, it does not show which parameter is being used.

Invalid test naming in --collect-only -q report when the test is not part of a class

When pytest-pspec is installed pytest --collect-only -q fails to deal with tests that have no classes, seems to be the case with unittest or without

Here is a simple test module with one normal test and one unittest:

cat <<EOT >> test_broken_collect.py
import unittest
def test_no_unittest(): pass
class TestSome(unittest.TestCase):
    def test_this(self): pass
EOT

Let's collect:

pytest test_broken_collect.py --collect-only -q

Getting:

test_broken_collect.py::::test_no_unittest
test_broken_collect.py::TestSome::test_this

The first test item is bogus - it should be examples/seq2seq/test_broken_collect.py::test_no_unittest (i.e. 2 colons and not 4). If we feed it back to pytest it fails to run a test it reported it collected.

update: I first thought it had to do with mixing unittest, but it fails with just normal tests w/o classes too:

cat <<EOT >> test_broken_collect.py
def test_no_unittest(): pass
EOT

same problem, getting test_broken_collect.py::::test_no_unittest

pytest 6.0.1

Thanks.

Support parametrized tests

The output for parametrized tests currently looks weird as the line is just repeated. Maybe the test-id could be used?

How it looks like now

For pypdf using pytest tests/test_xmp.py --pspec I get:

image

boring UserWarning

Hello!

I get a warning every time I use pytest-pspec:

python3.7/site-packages/pytest_pspec/plugin.py:77:
UserWarning: Argument(s) ('config',)
which are declared in the hookspec can not be found in this hook call
res = self.config.hook.pytest_report_teststatus(report=report)
$ pytest --version
This is pytest version 4.4.0
setuptools registered plugins:
  pytest-pspec-0.0.3
  pytest-mock-1.10.3
  pytest-asyncio-0.10.0

What can be done about it?

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.