Skip to content

Commit

Permalink
Add benchmarks for empty username and password (#1269)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Oct 15, 2024
1 parent d76b880 commit affe81c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_url_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,20 @@ def _run() -> None:
url.raw_password


def test_url_make_empty_username(benchmark: BenchmarkFixture) -> None:
@benchmark
def _run() -> None:
for _ in range(100):
URL("http://:[email protected]")


def test_url_make_empty_password(benchmark: BenchmarkFixture) -> None:
@benchmark
def _run() -> None:
for _ in range(100):
URL("http://user:@www.domain.tld")


def test_url_make_with_ipv4_address_path_and_port(benchmark: BenchmarkFixture) -> None:
@benchmark
def _run() -> None:
Expand Down

0 comments on commit affe81c

Please sign in to comment.