python-opensubtitles icon indicating copy to clipboard operation
python-opensubtitles copied to clipboard

Move pydoctests to proper tests and mock them

Open agonzalezro opened this issue 7 years ago • 3 comments

The README.md has tests but they are not mocked so it makes them kinda useless if you don't have the film it's referring.

Those tests should be mocked and moved away from the README.

agonzalezro avatar Nov 02 '17 09:11 agonzalezro

What framework should we be using for the tests? I recommend pytest, it's currently regarded as one of the most powerful and scalable testing frameworks for Python. I've worked with it too, so I can contribute to the test-suite myself.`

skulltech avatar Nov 07 '17 22:11 skulltech

Hi @SkullTech,

I don't have that much of a preference at the moment. I've worked with pytest and nosetests in the past and I don't think that for such a small project would make any difference.

In the other hand, a friend recommended using tox to automate the testing in different versions of python. I think this could be achievable as well depending on the CI platform we use, however, having an option to run tests in different versions locally could be handy.

What are your thoughts?

agonzalezro avatar Nov 08 '17 10:11 agonzalezro

You're right, it won't make much difference which framework we choose. But still, going with pytest would be better as that has better support and all. I will start working on it. Can you assign me on this issue?

And using tox is a good idea, I have heard about it but haven't used it myself. I will look into it.

skulltech avatar Nov 17 '17 22:11 skulltech