fakemenot icon indicating copy to clipboard operation
fakemenot copied to clipboard

Extract OCR functions and add unit tests for them.

Open Double-A-92 opened this issue 8 years ago • 3 comments

init file was emptied and it's contents moved into main.py. That was needed for the new unit test structure. A step towards solving #5 .

Double-A-92 avatar Oct 15 '17 00:10 Double-A-92

Ok fixed the issues. :)

Btw. if you are really worried about compatibility... My IDE is showing me some warning about the "import configparser" in the main.py. But I don't really know how to avoid that now.

Double-A-92 avatar Oct 15 '17 00:10 Double-A-92

Hmm, OCR seems to be behaving differently on platforms. Image 3 is broken on Linux now because it's blown up a bit too much and detects handle incorrectly. I'm starting to wonder why. There should be a cleaner solution :/

pwnfoo avatar Oct 18 '17 03:10 pwnfoo

I don't know how to fix that quickly. The unittests themselves are correct, they check the right thing.

I could revert the ocr extraction code to the original (where it checks for the "v" to select the tweet body), so it's sure that I didn't break anything.

And then just let the test fail (justified) and you could open a seperate issue for that?

Double-A-92 avatar Oct 18 '17 17:10 Double-A-92