[pytest-dev] Running doctest for the certain function

2020-12-13 Thread Ilya Kazakevich via pytest-dev
Hello. I have some function with doctest in a file called "spam.py" ``` def egg(): """ >>> egg() True """ return True ``` I want to run doctest using pytest: ``pytest spam.py::egg --doctest-modules`` But it doesn't work: ==no tests ran in 0.05s == It seems that I can't

Re: [pytest-dev] pyi stubs (PEP 561/ PEP-484) for pytest

2018-11-26 Thread Ilya Kazakevich
Hello Florian, Bruno, We decided to start writing pyi file by ourselves. We'll send you first version for review. > PEP-561 only makes provisions for package-distributed libraries That is correct if you distribute it as part of pytest itself, but separate "pytest-stubs" should work even with modu

[pytest-dev] pyi stubs (PEP 561/ PEP-484) for pytest

2018-11-13 Thread Ilya Kazakevich
Hello, My name is Ilya, I develop pytest integration in PyCharm IDE. There is a PEP-484 that covers optional type hinting for Python an PEP-561 that describes how to distribute this information as separate package with .pyi files (also called stubs). Type hinting is huge benefit for any static a

[pytest-dev] hook to obtain parameters for parametrized test

2018-05-15 Thread Ilya Kazakevich
Hello. I write plugin for pytest, and I need to obtain parameters for test decorated with @parametrize before this test is actually called. There is a ``pytest_runtest_logstart``, but it does not provide information about parameters. There is ``pytest_runtest_setup`` but it is called too late. I