Skip to content

Commit bf97b98

Browse files
committed
Fix typos in tests.
1 parent 21a3418 commit bf97b98

5 files changed

Lines changed: 10 additions & 6 deletions

File tree

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ export PYTHON_CONTEXT_AWARE_WARNINGS=0
1313
build:
1414
python setup.py build_ext --inplace
1515

16+
spell:
17+
codespell src -w
18+
codespell tests -Lcaf,te -w
19+
1620
style:
1721
ruff format compliance src tests
1822
ruff check --fix compliance src tests

tests/legacy/test_protocol.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,7 +1343,7 @@ def test_local_close(self):
13431343
self.assertOneFrameSent(*self.close_frame)
13441344

13451345
# Closing the connection again is a no-op.
1346-
self.loop.run_until_complete(self.protocol.close(reason="oh noes!"))
1346+
self.loop.run_until_complete(self.protocol.close(reason="oh no!"))
13471347

13481348
self.assertConnectionClosed(CloseCode.NORMAL_CLOSURE, "close")
13491349
self.assertNoFrameSent()
@@ -1362,7 +1362,7 @@ def test_remote_close(self):
13621362
self.assertOneFrameSent(*self.close_frame)
13631363

13641364
# Closing the connection again is a no-op.
1365-
self.loop.run_until_complete(self.protocol.close(reason="oh noes!"))
1365+
self.loop.run_until_complete(self.protocol.close(reason="oh no!"))
13661366

13671367
self.assertConnectionClosed(CloseCode.NORMAL_CLOSURE, "close")
13681368
self.assertNoFrameSent()
@@ -1376,7 +1376,7 @@ def test_remote_close_and_connection_lost(self):
13761376
self.run_loop_once()
13771377

13781378
with self.assertNoLogs("websockets", logging.ERROR):
1379-
self.loop.run_until_complete(self.protocol.close(reason="oh noes!"))
1379+
self.loop.run_until_complete(self.protocol.close(reason="oh no!"))
13801380

13811381
self.assertConnectionClosed(CloseCode.NORMAL_CLOSURE, "close")
13821382
self.assertOneFrameSent(*self.close_frame)

tests/sync/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ def test_http_proxy_connection_failure(self):
517517

518518
def test_http_proxy_connection_timeout(self):
519519
"""Client times out while connecting to the HTTP proxy."""
520-
# Replace the proxy with a TCP server that does't respond.
520+
# Replace the proxy with a TCP server that doesn't respond.
521521
with socket.create_server(("localhost", 0)) as sock:
522522
host, port = sock.getsockname()
523523
with patch.dict(os.environ, {"https_proxy": f"http://{host}:{port}"}):

tests/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def test_port(self):
144144
self.assertEqual(request.headers["Host"], host)
145145

146146
def test_user_info(self):
147-
"""connect() perfoms HTTP Basic Authentication with user info from the URI."""
147+
"""connect() performs HTTP Basic Authentication with user info from the URI."""
148148
client = ClientProtocol(parse_uri("wss://hello:iloveyou@example.com/"))
149149
request = client.connect()
150150

tests/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
# Unit for timeouts. May be increased in slow or noisy environments by setting
4444
# the WEBSOCKETS_TESTS_TIMEOUT_FACTOR environment variable.
4545

46-
# Downstream distributors insist on running the test suite despites my pleas to
46+
# Downstream distributors insist on running the test suite despites my plea to
4747
# the contrary. They do it on build farms with unstable performance, leading to
4848
# flakiness, and then they file bugs. Make tests 100x slower to avoid flakiness.
4949

0 commit comments

Comments
 (0)