Skip to content

2.8.2 - specific test not running if custom parameter is used #1183

Closed
@novakmi

Description

@novakmi

In pytest 2.8.2, when single test is specified with optional parameter, the test will not run.

Runs OK:

py.test -s -v t1/t1_test.py::TestT1::test_t1     

Does not run:

py.test -s -v t1/t1_test.py::TestT1::test_t1 --dry-run

error:

  usage: py.test [options] [file_or_dir] [file_or_dir] [...]
  py.test: error: unrecognized arguments: --dry-run
      inifile: <removed dir>/tmp/pytest/t1/setup.cfg
      rootdir: <removed dir>/tmp/pytest/t1

(--dry-run is custom parameter from conftest.py)

This scenario is working with pytest 2.7.3

The source code can be found here:
https://mega.nz/#!hR1ABCIT!lSLEoWMCOUn1pDziFSu0qxh3AMcLVuNtUA6FpRVh_Zs

to reproduce, unpack tgz and try steps above with pytest 2.8.2 (fails) and then with pytest 2.7.3 (OK)

Is this a pytest issue or something wrong in my test structure/parameter handling?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions