PokeAPI/pokebase

How to run tests?

Naramsim opened this issue · 2 comments

I run: python -m unittest discover or python tests/test_pokebase.py, but it always fails with

ImportError: No module named 'pokebase'

I've been running the tests from within PyCharm, which I'm assuming magically resolved any import file path issues. I was able to reproduce and then fix the error. Try running the tests from the command line as python -m tests.test_pokebase, and let me know that that works for you. It looks like the cleanest solution. (Solution from Stack Overflow)

Well done! Now they work perfectly in both Python2 and 3.

I suggest you automate the tests by using Travis, which, additionally, gives you a beautiful badge

https://docs.travis-ci.com/user/languages/python/