-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* parse-w-params * no unwrap in params * clippy fix
- Loading branch information
1 parent
0c30efd
commit 5768652
Showing
8 changed files
with
115 additions
and
43 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import ry | ||
|
||
|
||
def test_parse_with_params_dict() -> None: | ||
url = ry.URL.parse_with_params( | ||
"https://example.net?dont=clobberme", | ||
dict([("lang", "rust"), ("browser", "servo")]), | ||
) | ||
assert str(url) == "https://example.net/?dont=clobberme&lang=rust&browser=servo" | ||
|
||
|
||
def test_parse_new_params_kwarg() -> None: | ||
url = ry.URL( | ||
"https://example.net?dont=clobberme", | ||
params=dict([("lang", "rust"), ("browser", "servo")]), | ||
) | ||
assert str(url) == "https://example.net/?dont=clobberme&lang=rust&browser=servo" | ||
|
||
|
||
# def test_parse_with_params_list() -> None: | ||
# url = ry.URL.parse_with_params("https://example.net?dont=clobberme", | ||
# [("lang", "rust"), ("browser", "servo")]) | ||
# assert url.as_str() == "https://example.net/?dont=clobberme&lang=rust&browser=servo" |