TriOptima / tri.form
1 1
import pytest
2

3

4 1
def pytest_runtest_setup(item):
5 1
    django_marker = item.get_closest_marker("django_db") or item.get_closest_marker("django")
6 1
    if django_marker is not None:
7 1
        try:
8 1
            import django
9 0
        except ImportError:
10 0
            pytest.skip("test requires django")
11

12 1
    flask_marker = item.get_closest_marker("flask")
13 1
    if flask_marker is not None:
14 0
        try:
15 0
            import flask
16 0
        except ImportError:
17 0
            pytest.skip('test requires flask')

Read our documentation on viewing source code .

Loading