diff --git a/tests/__init__.py b/tests/__init__.py index aa52c18a..46195669 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -11,11 +11,9 @@ """ from __future__ import print_function -import pytest import os import sys -import flask import warnings from functools import update_wrapper from contextlib import contextmanager @@ -82,22 +80,3 @@ def emits_module_deprecation_warning(f): for entry in log: assert 'Modules are deprecated' in str(entry['message']) return update_wrapper(new_f, f) - - -class TestFlask(object): - """Baseclass for all the tests that Flask uses. Use these methods - for testing instead of the camelcased ones in the baseclass for - consistency. - """ - - def setup_method(self, method): - self.setup() - - def teardown_method(self, method): - self.teardown() - - def setup(self): - pass - - def teardown(self): - pass diff --git a/tests/test_appctx.py b/tests/test_appctx.py index 57b4ede8..b4d77bfc 100644 --- a/tests/test_appctx.py +++ b/tests/test_appctx.py @@ -13,7 +13,7 @@ import pytest import flask import unittest -from tests import TestFlask + def test_basic_url_generation(): diff --git a/tests/test_basic.py b/tests/test_basic.py index f5e32622..3412b9ab 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -19,7 +19,7 @@ import pickle import unittest from datetime import datetime from threading import Thread -from tests import TestFlask, emits_module_deprecation_warning +from tests import emits_module_deprecation_warning from flask._compat import text_type from werkzeug.exceptions import BadRequest, NotFound, Forbidden from werkzeug.http import parse_date diff --git a/tests/test_blueprints.py b/tests/test_blueprints.py index f4c0b04c..5960c7d4 100644 --- a/tests/test_blueprints.py +++ b/tests/test_blueprints.py @@ -13,7 +13,7 @@ import pytest import flask import unittest -from tests import TestFlask + from flask._compat import text_type from werkzeug.http import parse_cache_control_header from jinja2 import TemplateNotFound diff --git a/tests/test_config.py b/tests/test_config.py index 9ce26b0f..662cef2a 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -18,7 +18,7 @@ import pkgutil import unittest import textwrap from contextlib import contextmanager -from tests import TestFlask + from flask._compat import PY2 diff --git a/tests/test_deprecations.py b/tests/test_deprecations.py index f8935d08..4b226d0e 100644 --- a/tests/test_deprecations.py +++ b/tests/test_deprecations.py @@ -11,4 +11,4 @@ import flask import unittest -from tests import TestFlask, catch_warnings +from tests import catch_warnings diff --git a/tests/test_ext.py b/tests/test_ext.py index dad0d585..7c8afbd6 100644 --- a/tests/test_ext.py +++ b/tests/test_ext.py @@ -17,7 +17,7 @@ try: from imp import reload as reload_module except ImportError: reload_module = reload -from tests import TestFlask + from flask._compat import PY2 diff --git a/tests/test_helpers.py b/tests/test_helpers.py index 652378a1..2ae72a0f 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -15,7 +15,7 @@ import os import flask import unittest from logging import StreamHandler -from tests import TestFlask, catch_warnings, catch_stderr +from tests import catch_warnings, catch_stderr from werkzeug.http import parse_cache_control_header, parse_options_header from flask._compat import StringIO, text_type diff --git a/tests/test_regression.py b/tests/test_regression.py index 1671f2fa..137c9b62 100644 --- a/tests/test_regression.py +++ b/tests/test_regression.py @@ -17,7 +17,7 @@ import sys import flask import threading from werkzeug.exceptions import NotFound -from tests import TestFlask + _gc_lock = threading.Lock() diff --git a/tests/test_reqctx.py b/tests/test_reqctx.py index 5bffbc19..282cd04f 100644 --- a/tests/test_reqctx.py +++ b/tests/test_reqctx.py @@ -17,7 +17,7 @@ try: from greenlet import greenlet except ImportError: greenlet = None -from tests import TestFlask + def test_teardown_on_pop(): diff --git a/tests/test_signals.py b/tests/test_signals.py index c76896fb..79283584 100644 --- a/tests/test_signals.py +++ b/tests/test_signals.py @@ -17,7 +17,7 @@ except ImportError: blinker = None import flask -from tests import TestFlask + pytestmark = pytest.mark.skipif( diff --git a/tests/test_subclassing.py b/tests/test_subclassing.py index bd953781..6766264e 100644 --- a/tests/test_subclassing.py +++ b/tests/test_subclassing.py @@ -12,7 +12,7 @@ import flask import unittest from logging import StreamHandler -from tests import TestFlask + from flask._compat import StringIO diff --git a/tests/test_templating.py b/tests/test_templating.py index f05418fb..92ded8fa 100644 --- a/tests/test_templating.py +++ b/tests/test_templating.py @@ -16,7 +16,7 @@ import unittest import logging from jinja2 import TemplateNotFound -from tests import TestFlask + def test_context_processing(): diff --git a/tests/test_testing.py b/tests/test_testing.py index deabd6bb..1916ea9c 100644 --- a/tests/test_testing.py +++ b/tests/test_testing.py @@ -12,7 +12,7 @@ import pytest import flask import unittest -from tests import TestFlask + from flask._compat import text_type diff --git a/tests/test_views.py b/tests/test_views.py index 0b7f828e..e08a2991 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -14,7 +14,7 @@ import pytest import flask import flask.views import unittest -from tests import TestFlask + from werkzeug.http import parse_set_header def common_test(app):