You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running pytest while working on #2286 it gave me warnings expressing methods within the TestSSHConfig class inside test_config.py were using nose test-specific methods, and support for such tests will be removed in future releases.
Since I'm not much accustomed to this subject, I wanted to first confirm whether these tests were indeed built as nose tests. Since the fix seems to be a simple find and replace (I did so, adding "_method" to the methods and pytest stopped issuing warnings about it), I'm more than happy to open a PR for it should it need to be addressed.
Below I'm attaching one of the warnings by Pytest. Since all of them look like this, I'm putting this one as an example, and the rest as a file attachment.
============================= test session starts ==============================
platform linux -- Python 3.11.4, pytest-7.4.0, pluggy-1.2.0
rootdir: /home/kali/paramiko-testing/paramiko
configfile: pytest.ini
plugins: relaxed-2.0.1, xdist-3.3.1
collected 559 items
--snip--
tests/test_config.py::TestSSHConfig::test_init
/home/kali/paramiko-testing/paramiko_venv/lib/python3.11/site-packages/_pytest/fixtures.py:895: PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
tests/test_config.py::TestSSHConfig::test_init is using nose-specific method: "setup(self)"
To remove this warning, rename it to "setup_method(self)"
See docs: https://docs.pytest.org/en/stable/deprecations.html#support-for-tests-written-for-nose
fixture_result = next(generator)
--snip--
=========== 533 passed, 26 skipped, 31 warnings in 88.84s (0:01:28) ============
PS. Pytest also complains the use of isSet() within the test_update_environment method inside SSHClientTest in test_client.py to be deprecated, I'm happy to include it in the PR so it can also be updated as well.
tests/test_client.py::SSHClientTest::test_update_environment
/home/kali/paramiko-testing/paramiko/tests/test_client.py:692: DeprecationWarning: isSet() is deprecated, use is_set() instead
self.assertTrue(self.event.isSet())
Running pytest while working on #2286 it gave me warnings expressing methods within the TestSSHConfig class inside test_config.py were using nose test-specific methods, and support for such tests will be removed in future releases.
Since I'm not much accustomed to this subject, I wanted to first confirm whether these tests were indeed built as nose tests. Since the fix seems to be a simple find and replace (I did so, adding "_method" to the methods and pytest stopped issuing warnings about it), I'm more than happy to open a PR for it should it need to be addressed.
Below I'm attaching one of the warnings by Pytest. Since all of them look like this, I'm putting this one as an example, and the rest as a file attachment.
PS. Pytest also complains the use of
isSet()
within thetest_update_environment
method inside SSHClientTest in test_client.py to be deprecated, I'm happy to include it in the PR so it can also be updated as well.pytest_log.log
The text was updated successfully, but these errors were encountered: