mirror of
https://github.com/curl/curl.git
synced 2026-08-25 10:53:37 +03:00
tests: alphabetize and group Python imports & add check
- De-duplicates, groups, and sorts imports based on the provided `isort` settings.
This commit is contained in:
parent
4c1b6f5494
commit
98e470b3a8
44 changed files with 110 additions and 134 deletions
|
|
@ -25,16 +25,19 @@
|
|||
###########################################################################
|
||||
# ruff: noqa: F401, E402
|
||||
import pytest
|
||||
|
||||
pytest.register_assert_rewrite("testenv.env", "testenv.curl", "testenv.caddy",
|
||||
"testenv.httpd", "testenv.nghttpx")
|
||||
|
||||
from .env import Env
|
||||
from .certs import TestCA, Credentials
|
||||
# This import must be first to avoid circular imports
|
||||
from .curl import CurlClient, ExecResult, RunProfile # noqa: I001
|
||||
|
||||
from .caddy import Caddy
|
||||
from .httpd import Httpd
|
||||
from .curl import CurlClient, ExecResult, RunProfile
|
||||
from .certs import Credentials, TestCA
|
||||
from .client import LocalClient
|
||||
from .nghttpx import Nghttpx, NghttpxQuic, NghttpxFwd
|
||||
from .vsftpd import VsFTPD
|
||||
from .dante import Dante
|
||||
from .env import Env
|
||||
from .httpd import Httpd
|
||||
from .nghttpx import Nghttpx, NghttpxFwd, NghttpxQuic
|
||||
from .sshd import Sshd
|
||||
from .vsftpd import VsFTPD
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import os
|
|||
import socket
|
||||
import subprocess
|
||||
import time
|
||||
from datetime import timedelta, datetime
|
||||
from datetime import datetime, timedelta
|
||||
from json import JSONEncoder
|
||||
from typing import Dict
|
||||
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ import os
|
|||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
from datetime import timedelta, datetime, timezone
|
||||
from typing import List, Any, Optional
|
||||
from datetime import datetime, timedelta, timezone
|
||||
from typing import Any, List, Optional
|
||||
|
||||
from cryptography import x509
|
||||
from cryptography.hazmat.backends import default_backend
|
||||
|
|
@ -40,10 +40,14 @@ from cryptography.hazmat.primitives._serialization import PublicFormat
|
|||
from cryptography.hazmat.primitives.asymmetric import ec, rsa
|
||||
from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurvePrivateKey
|
||||
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKey
|
||||
from cryptography.hazmat.primitives.serialization import Encoding, PrivateFormat, NoEncryption, load_pem_private_key
|
||||
from cryptography.hazmat.primitives.serialization import (
|
||||
Encoding,
|
||||
NoEncryption,
|
||||
PrivateFormat,
|
||||
load_pem_private_key,
|
||||
)
|
||||
from cryptography.x509 import ExtendedKeyUsageOID, NameOID
|
||||
|
||||
|
||||
EC_SUPPORTED = {}
|
||||
EC_SUPPORTED.update([(curve.name.upper(), curve) for curve in [
|
||||
ec.SECP192R1,
|
||||
|
|
|
|||
|
|
@ -29,12 +29,11 @@ import os
|
|||
import shutil
|
||||
import subprocess
|
||||
from datetime import datetime
|
||||
from typing import Optional, Dict
|
||||
from typing import Dict, Optional
|
||||
|
||||
from . import ExecResult
|
||||
from .env import Env
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -27,22 +27,21 @@
|
|||
import json
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
from functools import cmp_to_key
|
||||
from threading import Thread
|
||||
|
||||
import psutil
|
||||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
from statistics import mean, fmean
|
||||
from datetime import timedelta, datetime, timezone
|
||||
from typing import List, Optional, Dict, Union, Any
|
||||
import sys
|
||||
import time
|
||||
from datetime import datetime, timedelta, timezone
|
||||
from functools import cmp_to_key
|
||||
from statistics import fmean, mean
|
||||
from threading import Thread
|
||||
from typing import Any, Dict, List, Optional, Union
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from .env import Env
|
||||
import psutil
|
||||
|
||||
from .env import Env
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
|||
|
|
@ -29,8 +29,7 @@ import os
|
|||
import socket
|
||||
import subprocess
|
||||
import time
|
||||
from datetime import timedelta, datetime
|
||||
|
||||
from datetime import datetime, timedelta
|
||||
from typing import Dict
|
||||
|
||||
from . import CurlClient
|
||||
|
|
|
|||
|
|
@ -33,14 +33,13 @@ import subprocess
|
|||
import tempfile
|
||||
from configparser import ConfigParser, ExtendedInterpolation
|
||||
from datetime import timedelta
|
||||
from typing import Optional, Dict, List
|
||||
from typing import Dict, List, Optional
|
||||
|
||||
import pytest
|
||||
from filelock import FileLock
|
||||
|
||||
from .certs import CertificateSpec, Credentials, TestCA
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -24,17 +24,17 @@
|
|||
#
|
||||
###########################################################################
|
||||
#
|
||||
import copy
|
||||
import inspect
|
||||
import logging
|
||||
import os
|
||||
import shutil
|
||||
import socket
|
||||
import subprocess
|
||||
from datetime import timedelta, datetime
|
||||
from json import JSONEncoder
|
||||
import time
|
||||
from typing import List, Union, Optional, Dict
|
||||
import copy
|
||||
from datetime import datetime, timedelta
|
||||
from json import JSONEncoder
|
||||
from typing import Dict, List, Optional, Union
|
||||
|
||||
from .curl import CurlClient, ExecResult
|
||||
from .env import Env
|
||||
|
|
|
|||
|
|
@ -30,11 +30,11 @@ import signal
|
|||
import socket
|
||||
import subprocess
|
||||
import time
|
||||
from typing import Optional, Dict
|
||||
from datetime import datetime, timedelta
|
||||
from typing import Dict, Optional
|
||||
|
||||
from .env import Env, NghttpxUtil
|
||||
from .curl import CurlClient
|
||||
from .env import Env, NghttpxUtil
|
||||
from .ports import alloc_ports_and_do
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
|
|
|||
|
|
@ -30,8 +30,7 @@ import socket
|
|||
import stat
|
||||
import subprocess
|
||||
import time
|
||||
from datetime import timedelta, datetime
|
||||
|
||||
from datetime import datetime, timedelta
|
||||
from typing import Dict
|
||||
|
||||
from . import CurlClient
|
||||
|
|
|
|||
|
|
@ -30,9 +30,8 @@ import re
|
|||
import socket
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
from datetime import datetime, timedelta
|
||||
from typing import List, Dict
|
||||
from typing import Dict, List
|
||||
|
||||
from .curl import CurlClient, ExecResult
|
||||
from .env import Env
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue