Closed achavez closed 6 years ago
Thanks Andrew. Hopefully can roll a bugfix release with this tonight. Can you add a failing test for this? The (very minimal) trend report tests are here: https://github.com/newsdev/elex/blob/master/tests/test_trend_reports.py
Erg. This was almost certainly my mistake initially. Sorry.
@palewire @achavez WHO WILL WRITE ME A FAILING TEST?!?!
clears throat
http://1.media.collegehumor.cvcdn.com/59/14/12ad840f8f96e508a4e2bc5d654a18b5.gif
What kind of test are you looking for? Validating the parsed data object back against the raw stuff?
Good question. That would work great -- I was thinking just a failing test for this particular issue though.
The bug is deep down in the internals, so I don't think there's a surface level way to test it other than to compare the finished winning and leading numbers, which could in some cases be identical.
@eads: Something like 46bb61fd75c636d6ca1b1c5bc9355bc5f4de2bf0? That's written against the fixtures in the repo. It may be better to ensure that winning + leading = winning trend?
Shit, I got behind on this. Ummm, hope to get to it tomorrow probably not tonight but maybe.
My apologies, we didn't get to this before the appointed time.
Here's the current output from
elex senate-trends
:Note the duplicate values on
leading
/won
. This PR fixes that duplication and parses the AP'sLeading
field toleading
in theelex
output.