New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove nose support #4460
Comments
Hi @zzzeek |
hi @ParthS007 - this would mostly be removing files:
then removing things to do with "nose" from setup.cfg:
then making sure nothing broke with py.test. pretty easy |
but! it would be great if you can make sure you run the tests. a simple run is just like this:
then let it go. takes awhile. |
also this: diff --git a/lib/sqlalchemy/testing/plugin/plugin_base.py b/lib/sqlalchemy/testing/plugin/plugin_base.py
index 9c9e311428..d45d1ae0f3 100644
--- a/lib/sqlalchemy/testing/plugin/plugin_base.py
+++ b/lib/sqlalchemy/testing/plugin/plugin_base.py
@@ -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.
"""
@@ -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
@@ -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__) |
Thanks for the help @zzzeek . I am working on this and will make a PR shortly. 👍 |
@zzzeek I have made PR. Please review and let me know your view on it. |
Parth Shandilya has proposed a fix for this issue in the master branch: Fixes#4460: Removed Nose Support https://gerrit.sqlalchemy.org/1122 |
Parth Shandilya has proposed a fix for this issue in the master branch: Remove Nose support https://gerrit.sqlalchemy.org/1122 |
for 1.3, let's see if we can just take out the "nosetests" code altogether, as nose itself hasn't seen new releases in years and pytest has long since become the most widely used testing tool. This would at most only impact packagers, who are likely using "setup.py test" for testing, as well as third party dialects who use SQLAlchemy's testing framework, however I doubt the nose framework even works anymore in any case (tries) nope doesnt work in Python 3 due to this:
in python 2 it still works, very impressive. but we don't have the multi-process support so it still takes quite a long time to run.
note that we still will not hardcode pytest directives into the tests themselves, and the "test suite agnostic" system should stay in place. Only until a standard library testing elements should be within the tests themselves.
The text was updated successfully, but these errors were encountered: