-
-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move pip's frozen requirement API into a single module (#402)
- Loading branch information
Showing
4 changed files
with
47 additions
and
45 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
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,12 @@ | ||
from __future__ import annotations | ||
|
||
from unittest.mock import Mock | ||
|
||
from pipdeptree._freeze import dist_to_frozen_repr | ||
|
||
|
||
def test_dist_to_frozen_repr() -> None: | ||
foo = Mock(metadata={"Name": "foo"}, version="20.4.1") | ||
foo.read_text = Mock(return_value=None) | ||
expected = "foo==20.4.1" | ||
assert dist_to_frozen_repr(foo) == expected |