New issue 284: `python_classes` and `python_functions` configuration options
are ignored in pytest.ini
https://bitbucket.org/hpk42/pytest/issue/284/python_classes-and-python_functions
Gabor Lenard:
I have a `pytest.ini` file in my project folder with a proper [pytest] section
in it:
```
#!python
[pytest]
python_files=*.py
python_classes=Check
python_functions=check
```
I have a `example_test.py` file:
```
#!python
#!/usr/bin/env python
# encoding: utf-8
import unittest
class Example(unittest.TestCase):
def test_do(self): pass
def should_do(self): pass
def check_do(self): pass
```
When I enter `py.test` in the command line I expect that none of the methods
are invoked (or maybe only `check_do()`). However, this is what I see:
```
#!python
py.test
====================== test session starts =======================
platform darwin -- Python 2.7.2 -- pytest-2.3.4 -- /usr/bin/python
collected 1 items
example_test.py:5: Example.test_do PASSED
==================== 1 passed in 0.02 seconds ====================
```
The `python_files` seems to be detected correctly: if I change it to
`check*.py` then 0 tests are invoked.
Renaming the file to `tox.ini` or `setup.cfg` makes no difference. I don't have
any other configuration file lying around. I installed pytest today in order to
start doing TDD and wanted to start all my test methods with `should_`.
--
This is an issue notification from bitbucket.org. You are receiving
this either because you are the owner of the issue, or you are
following the issue.
_______________________________________________
pytest-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pytest-commit