Skip to content

Commit

Permalink
Merge "Remove Nose support"
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzeek authored and Gerrit Code Review committed Feb 3, 2019
2 parents 620bfde + d427d06 commit 2a2f7fe
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 214 deletions.
7 changes: 7 additions & 0 deletions doc/build/changelog/unreleased_13/4460.rst
@@ -0,0 +1,7 @@
.. change::
:tags: change, tests
:tickets: 4460

The test system has removed support for Nose, which is unmaintained for
several years and is producing warnings under Python 3. The test suite is
currently standardized on Pytest. Pull request courtesy Parth Shandilya.
5 changes: 1 addition & 4 deletions lib/sqlalchemy/testing/plugin/bootstrap.py
@@ -1,5 +1,5 @@
"""
Bootstrapper for nose/pytest plugins.
Bootstrapper for test framework plugins.
The entire rationale for this system is to get the modules in plugin/
imported without importing all of the supporting library, so that we can
Expand Down Expand Up @@ -41,8 +41,5 @@ def load_file_as_module(name):
if to_bootstrap == "pytest":
sys.modules["sqla_plugin_base"] = load_file_as_module("plugin_base")
sys.modules["sqla_pytestplugin"] = load_file_as_module("pytestplugin")
elif to_bootstrap == "nose":
sys.modules["sqla_plugin_base"] = load_file_as_module("plugin_base")
sys.modules["sqla_noseplugin"] = load_file_as_module("noseplugin")
else:
raise Exception("unknown bootstrap: %s" % to_bootstrap) # noqa
113 changes: 0 additions & 113 deletions lib/sqlalchemy/testing/plugin/noseplugin.py

This file was deleted.

10 changes: 5 additions & 5 deletions lib/sqlalchemy/testing/plugin/plugin_base.py
Expand Up @@ -8,8 +8,9 @@
"""Testing extensions.
this module is designed to work as a testing-framework-agnostic library,
so that we can continue to support nose and also begin adding new
functionality via py.test.
created so that multiple test frameworks can be supported at once
(mostly so that we can migrate to new ones). The current target
is py.test.
"""

Expand Down Expand Up @@ -244,8 +245,7 @@ def post_begin():
for fn in post_configure:
fn(options, file_config)

# late imports, has to happen after config as well
# as nose plugins like coverage
# late imports, has to happen after config.
global util, fixtures, engines, exclusions, assertions
global warnings, profiling, config, testing
from sqlalchemy import testing # noqa
Expand Down Expand Up @@ -575,7 +575,7 @@ def _setup_engine(cls):

def before_test(test, test_module_name, test_class, test_name):

# like a nose id, e.g.:
# format looks like:
# "test.aaa_profiling.test_compiler.CompileTest.test_update_whereclause"

name = getattr(test_class, "_sa_orig_cls_name", test_class.__name__)
Expand Down
50 changes: 0 additions & 50 deletions lib/sqlalchemy/testing/runner.py

This file was deleted.

6 changes: 0 additions & 6 deletions setup.cfg
Expand Up @@ -4,12 +4,6 @@ tag_build = dev
[metadata]
license_file = LICENSE

[nosetests]
with-sqla_testing = true
exclude = ^examples
first-package-wins = true
where = test

[tool:pytest]
addopts= --tb native -v -r sfxX --maxfail=25 -p no:warnings -p no:logging
python_files=test/*test_*.py
Expand Down
36 changes: 0 additions & 36 deletions sqla_nose.py

This file was deleted.

0 comments on commit 2a2f7fe

Please sign in to comment.