-
-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add benchmarks for empty username and password (#1269)
- Loading branch information
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|