Closed erkghlerngm44 closed 7 years ago
Merging #6 into master will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #6 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 7 7
Lines 106 110 +4
=====================================
+ Hits 106 110 +4
Impacted Files | Coverage Δ | |
---|---|---|
malaffinity/__init__.py | 100% <ø> (ø) |
:arrow_up: |
malaffinity/malaffinity.py | 100% <0%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update ff0288e...ceb654b. Read the comment docs.
E: I can't be bothered.
Ugh
The calculate_affinity
function is used in the test_affinity__with_self
test, because I didn't want to initialise a class and all that. There isn't actually a test for it.
I don't think there's a way to test the comparison
and calculate_affinity
functions properly without creating a second MAL account for it. malaffinity.endpoints.myanimelist
can't be swapped out halfway through running the functions, so we can't use the DUMMY_LIST
for it.
Hmmm... Could try to write another mock function, that'll return different things based on the username
passed to it. If it gets testmalacct0000
, then return its list. If it gets another, then return the DUMMY_LIST
. That could easily be placed in from the start.
The question is how one can go about retrieving a list off MAL, if the endpoint for doing so is replaced with the thing that wants to call it...
This all needs tidying up, but I really can't be bothered. ¯\_(ツ)_/¯
Let's see what Codecov's fancy pull request comments look like.
TODO: