Comments (8)
I could "fix" it by adding:
markers =
datafiles: load datafiles
to my pytest.ini
.
from pytest-datafiles.
Same here, see https://docs.pytest.org/en/latest/writing_plugins.html#registering-custom-markers
Warning:
/home/joe/.cache/pypoetry/virtualenvs/org-obs-py3.6/lib/python3.6/site-packages/_pytest/mark/structures.py:324
/home/joe/.cache/pypoetry/virtualenvs/org-obs-py3.6/lib/python3.6/site-packages/_pytest/mark/structures.py:324
/home/joe/.cache/pypoetry/virtualenvs/org-obs-py3.6/lib/python3.6/site-packages/_pytest/mark/structures.py:324
/home/joe/.cache/pypoetry/virtualenvs/org-obs-py3.6/lib/python3.6/site-packages/_pytest/mark/structures.py:324
/home/joe/.cache/pypoetry/virtualenvs/org-obs-py3.6/lib/python3.6/site-packages/_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.datafiles - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
PytestUnknownMarkWarning,
Versions:
$ pytest --version
This is pytest version 4.5.0, imported from /home/joe/.cache/pypoetry/virtualenvs/org-obs-py3.6/lib/python3.6/site-packages/pytest.py
setuptools registered plugins:
pytest-forked-1.0.2 at /home/joe/.cache/pypoetry/virtualenvs/org-obs-py3.6/lib/python3.6/site-packages/pytest_forked/__init__.py
pytest-benchmark-3.2.2 at /home/joe/.cache/pypoetry/virtualenvs/org-obs-py3.6/lib/python3.6/site-packages/pytest_benchmark/plugin.py
pytest-voluptuous-1.1.0 at /home/joe/.cache/pypoetry/virtualenvs/org-obs-py3.6/lib/python3.6/site-packages/pytest_voluptuous/plugin.py
pytest-cov-2.7.1 at /home/joe/.cache/pypoetry/virtualenvs/org-obs-py3.6/lib/python3.6/site-packages/pytest_cov/plugin.py
pytest-datafiles-2.0 at /home/joe/.cache/pypoetry/virtualenvs/org-obs-py3.6/lib/python3.6/site-packages/pytest_datafiles.py
pytest-mock-1.10.4 at /home/joe/.cache/pypoetry/virtualenvs/org-obs-py3.6/lib/python3.6/site-packages/pytest_mock.py
pytest-datadir-1.3.0 at /home/joe/.cache/pypoetry/virtualenvs/org-obs-py3.6/lib/python3.6/site-packages/pytest_datadir/plugin.py
pytest-xdist-1.28.0 at /home/joe/.cache/pypoetry/virtualenvs/org-obs-py3.6/lib/python3.6/site-packages/xdist/plugin.py
pytest-xdist-1.28.0 at /home/joe/.cache/pypoetry/virtualenvs/org-obs-py3.6/lib/python3.6/site-packages/xdist/looponfail.py
$ python --version
Python 3.6.7
$ pip --version
pip 19.1.1 from /home/joe/.cache/pypoetry/virtualenvs/org-obs-py3.6/lib/python3.6/site-packages/pip (python 3.6)
from pytest-datafiles.
According to the changelog this is a new feature of pytest 4.5.0 to avoid errors due to typos in markers. Are you sure you are using 4.3.0 ?
from pytest-datafiles.
Sorry, might be that I picked up the wrong pytest version from a different tox environment.
from pytest-datafiles.
I have this issue when using:
platform darwin -- Python 3.7.4, pytest-5.0.1, py-1.8.0, pluggy-0.13.0
rootdir: /Users/user/my-location, inifile: pytest.ini
plugins: datafiles-2.0, dotenv-0.4.0, cov-2.7.1
This yields:
.../python3.7/site-packages/_pytest/mark/structures.py:332: PytestUnknownMarkWarning: Unknown pytest.mark.datafiles - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
PytestUnknownMarkWarning,
from pytest-datafiles.
Just in case if someone is using pyproject.toml
:
[tool.pytest.ini_options]
markers = ["datafiles: load datafiles"]
from pytest-datafiles.
Should be fixed in commit f95315e . I will make a release soon.
from pytest-datafiles.
Released in 2.0.1
from pytest-datafiles.
Related Issues (13)
- Symlinks not replicated in temporary directory HOT 3
- mode bits are not copied HOT 1
- ScopeMismatch error when using datafiles in a module-scoped fixture HOT 2
- Change in order of retrieval HOT 1
- datafiles in parameterized fixture HOT 2
- PytestUnknownMarkWarning: Unknown pytest.mark.datafiles with pytest 6.2.4 HOT 7
- Warning in pytest-3.8.0 HOT 4
- Tests not included in sdist HOT 1
- use in combination with @fixture HOT 8
- Use datafiles inside a fixture HOT 1
- Paths relative to test files HOT 6
- `py.path` vs `pathlib.Path` HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytest-datafiles.