format patches

This commit is contained in:
zhouganqing 2022-11-25 17:13:33 +08:00
parent f7d9a0db37
commit b65584ee98
3 changed files with 29 additions and 26 deletions

View File

@ -1,4 +1,3 @@
From 27cf199381eeda54bac225c7ed1712c42f61f044 Mon Sep 17 00:00:00 2001
From: Benjamin Drung <bdrung@ubuntu.com>
Date: Tue, 12 Apr 2022 15:49:24 +0200
Subject: Fix spelling mistake of distributed
@ -16,7 +15,7 @@ Forwarded: https://github.com/paramiko/paramiko/pull/2031
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/paramiko/ecdsakey.py b/paramiko/ecdsakey.py
index 62bc8d9b..ad84fe31 100644
index c4e2b1a..6ab66cc 100644
--- a/paramiko/ecdsakey.py
+++ b/paramiko/ecdsakey.py
@@ -7,7 +7,7 @@
@ -29,7 +28,7 @@ index 62bc8d9b..ad84fe31 100644
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
diff --git a/paramiko/ed25519key.py b/paramiko/ed25519key.py
index b29d82c5..c9e37e0a 100644
index d322a0c..0cbc55e 100644
--- a/paramiko/ed25519key.py
+++ b/paramiko/ed25519key.py
@@ -5,7 +5,7 @@
@ -42,7 +41,7 @@ index b29d82c5..c9e37e0a 100644
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
diff --git a/paramiko/kex_group14.py b/paramiko/kex_group14.py
index 2d82d764..8dee5515 100644
index a620c1a..a683141 100644
--- a/paramiko/kex_group14.py
+++ b/paramiko/kex_group14.py
@@ -7,7 +7,7 @@
@ -55,7 +54,7 @@ index 2d82d764..8dee5515 100644
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
diff --git a/paramiko/kex_group16.py b/paramiko/kex_group16.py
index b53aad38..c675f877 100644
index 15b0acf..7feddfd 100644
--- a/paramiko/kex_group16.py
+++ b/paramiko/kex_group16.py
@@ -7,7 +7,7 @@
@ -68,7 +67,7 @@ index b53aad38..c675f877 100644
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
diff --git a/paramiko/proxy.py b/paramiko/proxy.py
index 3e3e61a6..f7609c98 100644
index 077e8e3..50a0f88 100644
--- a/paramiko/proxy.py
+++ b/paramiko/proxy.py
@@ -7,7 +7,7 @@
@ -80,6 +79,3 @@ index 3e3e61a6..f7609c98 100644
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
--
2.32.0

View File

@ -1,4 +1,3 @@
From 014030ee0daa5bd87c873e155e4abe23c7d4c52a Mon Sep 17 00:00:00 2001
From: Stanislav Levin <slev@altlinux.org>
Date: Thu, 2 Dec 2021 17:11:29 +0300
Subject: [PATCH] sftp tests: Replace unittest parts
@ -20,9 +19,11 @@ Signed-off-by: Stanislav Levin <slev@altlinux.org>
tests/test_sftp.py | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/__init__.py b/tests/__init__.py
index 9850f3c..74d662c 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -36,7 +36,7 @@ def requireNonAsciiLocale(category_name=
@@ -36,7 +36,7 @@ def requireNonAsciiLocale(category_name="LC_ALL"):
def _decorate_with_locale(category, try_locales, test_method):
"""Decorate test_method to run after switching to a different locale."""
@ -31,7 +32,7 @@ Signed-off-by: Stanislav Levin <slev@altlinux.org>
original = locale.setlocale(category)
while try_locales:
try:
@@ -46,7 +46,7 @@ def _decorate_with_locale(category, try_
@@ -46,7 +46,7 @@ def _decorate_with_locale(category, try_locales, test_method):
try_locales.pop(0)
else:
try:
@ -40,6 +41,8 @@ Signed-off-by: Stanislav Levin <slev@altlinux.org>
finally:
locale.setlocale(category, original)
skipTest = getattr(testself, "skipTest", None)
diff --git a/tests/test_sftp.py b/tests/test_sftp.py
index 6134d07..2152d88 100644
--- a/tests/test_sftp.py
+++ b/tests/test_sftp.py
@@ -277,7 +277,7 @@ class TestSFTP(object):

View File

@ -4,10 +4,24 @@ Date: Wed, 2 Sep 2020 10:30:06 +0200
Subject: remove_pytest_relaxed
---
setup.cfg | 1 -
pytest.ini | 3 ---
tests/test_client.py | 23 ++++++++++++-----------
2 files changed, 12 insertions(+), 12 deletions(-)
2 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/pytest.ini b/pytest.ini
index be207cd..5a506bc 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -1,7 +1,4 @@
[pytest]
-# We use pytest-relaxed just for its utils at the moment, so disable it at the
-# plugin level until we adapt test organization to really use it.
-addopts = -p no:relaxed
# Loop on failure
looponfailroots = tests paramiko
# Ignore some warnings we cannot easily handle.
diff --git a/tests/test_client.py b/tests/test_client.py
index f14aac2..a3bc1ac 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -33,7 +33,7 @@ import warnings
@ -19,7 +33,7 @@ Subject: remove_pytest_relaxed
from mock import patch, Mock
import paramiko
@@ -685,12 +685,12 @@ class PasswordPassphraseTests(ClientTest
@@ -685,12 +685,12 @@ class PasswordPassphraseTests(ClientTest):
# Straightforward / duplicate of earlier basic password test.
self._test_connection(password="pygmalion")
@ -36,7 +50,7 @@ Subject: remove_pytest_relaxed
def test_passphrase_kwarg_used_for_key_passphrase(self):
# Straightforward again, with new passphrase kwarg.
@@ -708,14 +708,15 @@ class PasswordPassphraseTests(ClientTest
@@ -708,14 +708,15 @@ class PasswordPassphraseTests(ClientTest):
password="television",
)
@ -58,13 +72,3 @@ Subject: remove_pytest_relaxed
+ passphrase="wat? lol no",
+ )
+
--- a/pytest.ini
+++ b/pytest.ini
@@ -1,7 +1,4 @@
[pytest]
-# We use pytest-relaxed just for its utils at the moment, so disable it at the
-# plugin level until we adapt test organization to really use it.
-addopts = -p no:relaxed
# Loop on failure
looponfailroots = tests paramiko
# Ignore some warnings we cannot easily handle.