py.test use -m AS WELL as directory path in command
<p>I'd like to only run selenium tests in my test suite, in addition to filtering it down to only run tests in a specific file/folder. It seems like I should be able to accomplish this with the <code>-m</code> option, and the path positional argument. Furthermore, I'm doing this in a bash script.</p>

<p>So for example, I tried something like this:</p>

<pre><code>#!/bin/bash
# ...some logic here for determining `EXTRA` arg
EXTRA = "not selenium"
py.test -m $EXTRA -v -s --tb=long --no-flaky-report ~/project/mytests/test_blerg.py
</code></pre>

<p>And then my test looks like this (still using xunit-style classes):</p>

<pre><code>@pytest.mark.selenium
class BaseTest(UnitTest):
    pass

class ChildTest(BaseTest):

    def test_first_case(self):
        pass
</code></pre>

<p>When I run the py.test command as I described above, I get this:</p>

<pre><code>============================================================================ no tests ran in 0.01 seconds ============================================================================
ERROR: file not found: selenium"
</code></pre>

<p>Not completely sure why this doesn't work. I'll try manually overriding <code>pytest_runtest_setup()</code>, but I'm feel like I should be able to accomplish what I want without doing that. Also, just FYI, this <strong>is</strong> a django project, using <code>Django==1.8.7</code> and <code>pytest-django==2.9.1</code>.</p>

<p>Any help would be greatly appreciated :)</p>