Example #1
0
# coding=utf-8
#
# This file is part of Hypothesis (https://github.com/DRMacIver/hypothesis)
#
# Most of this work is copyright (C) 2013-2015 David R. MacIver
# ([email protected]), but it contains contributions by others. See
# https://github.com/DRMacIver/hypothesis/blob/master/CONTRIBUTING.rst for a
# full list of people who may hold copyright, and consult the git log if you
# need to determine who owns an individual contribution.
#
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at http://mozilla.org/MPL/2.0/.
#
# END HEADER

from __future__ import division, print_function, absolute_import

import gc

import pytest

from tests.common.setup import run

run()


@pytest.fixture(scope=u'function', autouse=True)
def some_fixture():
    gc.collect()
Example #2
0
#
# END HEADER

import gc
import random
import sys
import time as time_module

import pytest

from hypothesis.internal.detection import is_hypothesis_test

from tests.common import TIME_INCREMENT
from tests.common.setup import run

run()

# Skip collection of tests which require the Django test runner,
# or that don't work on the current version of Python.
collect_ignore_glob = ["django/*"]
if sys.version_info < (3, 7):
    collect_ignore_glob.append("cover/*py37*")
if sys.version_info < (3, 8):
    collect_ignore_glob.append("cover/*py38*")


def pytest_configure(config):
    config.addinivalue_line("markers", "slow: pandas expects this marker to exist.")


def pytest_addoption(parser):
Example #3
0
# Most of this work is copyright (C) 2013-2017 David R. MacIver
# ([email protected]), but it contains contributions by others. See
# CONTRIBUTING.rst for a full list of people who may hold copyright, and
# consult the git log if you need to determine who owns an individual
# contribution.
#
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at http://mozilla.org/MPL/2.0/.
#
# END HEADER

from __future__ import division, print_function, absolute_import

import os
import sys

from tests.common.setup import run

if __name__ == u'__main__':
    import django

    django_version = tuple(int(n) for n in django.__version__.split('.')[:2])
    run(deprecations_as_errors=django_version >= (1, 11))
    os.environ.setdefault(u'DJANGO_SETTINGS_MODULE',
                          u'tests.django.toys.settings')

    from django.core.management import execute_from_command_line

    execute_from_command_line(sys.argv)