diff --git a/examples/rest.py b/examples/rest.py index 6b119aac8c..1955a7e6af 100644 --- a/examples/rest.py +++ b/examples/rest.py @@ -50,7 +50,7 @@ def t(self): with self.rest("POST", "/post", json={"foo": 1}) as resp: 1 / 0 # pylint: disable=pointless-statement - # response isnt even json, but RestUser will already have been marked it as a failure, so we dont have to do it again + # response isn't even json, but RestUser will already have been marked it as a failure, so we dont have to do it again with self.rest("GET", "/") as resp: pass diff --git a/examples/web_ui_cache_stats.py b/examples/web_ui_cache_stats.py index 9a526b0f64..09c9a98430 100644 --- a/examples/web_ui_cache_stats.py +++ b/examples/web_ui_cache_stats.py @@ -38,7 +38,7 @@ class WebsiteUser(HttpUser): # This example is based on the Varnish hit/miss headers (https://docs.varnish-software.com/tutorials/hit-miss-logging/). -# It could easly be customised for matching other caching sytems, CDN or custom headers. +# It could easily be customised for matching other caching systems, CDN or custom headers. CACHE_HEADER = "X-Cache" cache_stats = {} diff --git a/locust/input_events.py b/locust/input_events.py index 6c4d4e4886..d34978ff50 100644 --- a/locust/input_events.py +++ b/locust/input_events.py @@ -56,7 +56,7 @@ def __init__(self): self.cur_keys_length = 0 self.captured_chars = [] except pywintypes.error: - raise InitError("Terminal says its a tty but we couldnt enable line input. Keyboard input disabled.") + raise InitError("Terminal says its a tty but we couldn't enable line input. Keyboard input disabled.") else: raise InitError("Terminal was not a tty. Keyboard input disabled") diff --git a/locust/main.py b/locust/main.py index 38550ab618..0fe1f931a7 100644 --- a/locust/main.py +++ b/locust/main.py @@ -220,7 +220,7 @@ def is_valid_percentile(parameter): children.append(child_pid) logging.debug(f"Started child worker with pid #{child_pid}") else: - # child is always a worker, even when it wasnt set on command line + # child is always a worker, even when it wasn't set on command line options.worker = True # remove options that dont make sense on worker options.run_time = None diff --git a/locust/runners.py b/locust/runners.py index c54d35aade..0cf4d42473 100644 --- a/locust/runners.py +++ b/locust/runners.py @@ -378,7 +378,7 @@ def stop(self) -> None: caller = inspect.getframeinfo(inspect.stack()[1][0]) logger.debug(f"Stopping all users (called from {caller.filename}:{caller.lineno})") except Exception: - logger.debug("Stopping all users (couldnt determine where stop() was called from)") + logger.debug("Stopping all users (couldn't determine where stop() was called from)") self.environment.events.test_stopping.fire(environment=self.environment) self.final_user_classes_count = {**self.user_classes_count} self.update_state(STATE_CLEANUP) diff --git a/locust/test/test_main.py b/locust/test/test_main.py index 583260b02a..743507192b 100644 --- a/locust/test/test_main.py +++ b/locust/test/test_main.py @@ -832,7 +832,7 @@ def my_task(self): def test_web_options(self): port = get_free_tcp_port() if platform.system() != "Darwin": - # MacOS only sets up the loopback interface for 127.0.0.1 and not for 127.*.*.*, so we cant test this + # MacOS only sets up the loopback interface for 127.0.0.1 and not for 127.*.*.*, so we can't test this with mock_locustfile() as mocked: proc = subprocess.Popen( ["locust", "-f", mocked.file_path, "--web-host", "127.0.0.2", "--web-port", str(port)], diff --git a/locust/test/test_runners.py b/locust/test/test_runners.py index 3d630d5a39..a903b2733a 100644 --- a/locust/test/test_runners.py +++ b/locust/test/test_runners.py @@ -3214,7 +3214,7 @@ def my_task(self): def test_worker_sends_unrecognized_message_to_master(self): """ - Validate master ignores message from worker when it cannot parse adddress info. + Validate master ignores message from worker when it cannot parse address info. """ class TestUser(User): diff --git a/locust/test/test_stats.py b/locust/test/test_stats.py index 0141bd54e3..71c38d1537 100644 --- a/locust/test/test_stats.py +++ b/locust/test/test_stats.py @@ -367,7 +367,7 @@ def test_print_error_report(self): headlines = info[1].replace("# ", "#").split() # check number of columns in headlines vs table ascii separator self.assertEqual(len(headlines), len(info[2].split("|"))) - # table ascii seprators + # table ascii separators self.assertEqual(info[2], info[-2])