Git Product home page Git Product logo

Comments (2)

RKrahl avatar RKrahl commented on May 24, 2024

Actually, it is mentioned in the documentation. There is a dedicated section on the names of tests and how they need to be referenced in the dependency marker. It states that the default is the pytest node id and that: “If the function or method is parameterized, the parameter values, separated by minus ‘-’, in square brackets ‘[]’ are appended to the node id.”

Note that the way pytest creates node ids for parametrized tests may become complicated, in particular if the parameter values do not have obvious string representations or if one set of parameter values appears more then once. Documenting all the intricate details is probably out of scope of the pytest-dependency documentation. I rather tend to resort recommending trying it out in the given case by calling pytest with the –verbose command line option. This is also already mentioned in the Names section but might get elaborated in the context of #41.

from pytest-dependency.

jamesbraza avatar jamesbraza commented on May 24, 2024

Just read through the Names page, and I see that it has lots of information on pytest.mark.parametrize. I realized that when searching:

  • "parametrize": Names page doesn't come up
  • "parametrized" or "pytest.mark.parametrize": multiple results mentioning parametrization comes up

I didn't know Read the Docs had such an exact search... otherwise I wouldn't have made this issue.

I also didn't know one can actually use pytest-dependency inside of pytest parametrizations, or even account for dependency on all instances of a parametrized test. Turns out usage with pytest.mark.parametrize is actually well documented, and flexible!

I think a debugging page would be nice for sure. You're doing great work here @RKrahl !

from pytest-dependency.

Related Issues (20)

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.