running unittests \ integration tests in python
<p>I have a Django project with multiple apps. Each app has a set of unittests. I'm using pytest as my test runner. We have gotten to a point that we want to start writing integration tests. I was wondering if there is any way to keep the naming convention and thus the auto discovery of pytest but still be able (via flag maybe?) to run the different test types. The most intuitive solution that comes to mind is some sort of decorator on test methods or even <code>TestCase</code> classes (something like Category in JUnit). <br/>
something like:</p>

<pre><code>@testtype('unittest')
def test_my_test(self):
    # do some testing

@testtype('integration')
def test_my_integration_test(self):
    # do some integration testing
</code></pre>

<p>and then i could run the test like:</p>

<pre><code>py.test --type=integration
py.test --type=unittest
</code></pre>

<p>Is there such a thing? <br/>
If not, the only other solution i can think about is to add a django command and "manually" build a testsuite and run it with pytest... I would prefer not to use this option. Is there any other solution that can help me?<br/>
Thanks</p>