Skip to content

Commit

Permalink
Fixed linting errors found by ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
johubertj committed Feb 20, 2025
1 parent f8904b1 commit 2c8b82e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions tests/integrationv2/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import itertools
import random
import string
import pytest

from constants import TEST_CERT_DIRECTORY
from global_flags import get_flag, S2N_PROVIDER_VERSION
Expand Down
3 changes: 1 addition & 2 deletions tests/integrationv2/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import pytest
import subprocess

from global_flags import get_flag
from processes import ManagedProcess
from providers import Provider, S2N

Expand Down Expand Up @@ -77,7 +76,7 @@ def _fn(provider_class: Provider, options: ProviderOptions, timeout=5, send_mark

try:
yield _fn
except Exception as e:
except Exception as _:
# The ManagedProcess already prints information to stdout, so there
# is nothing to capture here.
pass
Expand Down
1 change: 1 addition & 0 deletions tests/integrationv2/processes.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ def _communicate(self, input_data=None, send_marker_list=None, close_marker=None

ready = selector.select(timeout)
self._check_timeout(endtime, orig_timeout, stdout, stderr)
input_view = b""

# (Key, events) tuple represents a single I/O operation
for key, events in ready:
Expand Down
6 changes: 3 additions & 3 deletions tests/integrationv2/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,13 +676,13 @@ def setup_client(self):
if self.options.key is not None:
cmd_line.extend(['-key', self.options.key])
if self.options.cipher is not None:
if self.options.cipher == Ciphersuites.TLS_CHACHA20_POLY1305_SHA256:
if self.options.cipher == Ciphers.TLS_CHACHA20_POLY1305_SHA256:
cmd_line.extend(
['-cipher', 'TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256'])
elif self.options.cipher == Ciphersuites.TLS_AES_128_GCM_256:
elif self.options.cipher == Ciphers.TLS_AES_128_GCM_256:
pytest.skip('BoringSSL does not support Cipher {}'.format(
self.options.cipher))
elif self.options.cipher == Ciphersuites.TLS_AES_256_GCM_384:
elif self.options.cipher == Ciphers.TLS_AES_256_GCM_384:
pytest.skip('BoringSSL does not support Cipher {}'.format(
self.options.cipher))
if self.options.curve is not None:
Expand Down

0 comments on commit 2c8b82e

Please sign in to comment.