diff options
| author | John Turner <jturner.usa@gmail.com> | 2024-02-19 19:32:45 -0500 |
|---|---|---|
| committer | Sam James <sam@gentoo.org> | 2024-03-07 18:49:06 +0000 |
| commit | 34a96faca419b81be2c88655daec4a24056fd926 (patch) | |
| tree | 6aa517d5abfda50e711c8ed3e8e7a8f00ca26baa /THANKS | |
| parent | 5c8f8d79a8b6179e50b2eb955eb848096727a9ac (diff) | |
| download | gentoolkit-34a96faca419b81be2c88655daec4a24056fd926.tar.gz | |
dependencies.py: introduce unit testing for graph_reverse_depends
This commit introduces a new file with a basic unit test for the
graph_reverse_depends method on the Dependencies class.
Only 1 test exists right now, but various setup code and the general
pattern of the tests are valuable for creating more advanced tests,
and more tests for the Dependencies class in general.
Pytest is used to run all of the functions in the file that start with
test_, and a monkeypatch object is passed into test cases and allows
us to mock out methods on the Dependencies class, specifically the
"environment" method, which is used to query for packages variables
like DEPEND and RDEPEND. We are able to test against a small fake
denendency graph by patching the method!
Signed-off-by: John Turner <jturner.usa@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'THANKS')
0 files changed, 0 insertions, 0 deletions
