Code Monkey home page Code Monkey logo

Comments (8)

drorata avatar drorata commented on May 26, 2024 10

I could "fix" it by adding:

markers =
    datafiles: load datafiles

to my pytest.ini.

from pytest-datafiles.

dazza-codes avatar dazza-codes commented on May 26, 2024

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.

omarkohl avatar omarkohl commented on May 26, 2024

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.

languitar avatar languitar commented on May 26, 2024

Sorry, might be that I picked up the wrong pytest version from a different tox environment.

from pytest-datafiles.

drorata avatar drorata commented on May 26, 2024

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.

hf-krechan avatar hf-krechan commented on May 26, 2024

Just in case if someone is using pyproject.toml:

[tool.pytest.ini_options]
markers = ["datafiles: load datafiles"]

from pytest-datafiles.

omarkohl avatar omarkohl commented on May 26, 2024

Should be fixed in commit f95315e . I will make a release soon.

from pytest-datafiles.

omarkohl avatar omarkohl commented on May 26, 2024

Released in 2.0.1

from pytest-datafiles.

Related Issues (13)

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.