-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved testing and update readme / docs #45
base: master
Are you sure you want to change the base?
Conversation
"subTest" used in "test_all_sites" is not available in py2 unittest so we use unittest2 instead.
1c4dfb6
to
187f612
Compare
@LuqueDaniel Do you know how to fix the travis / appveyor stuff. One problem is that pylint returns exit code 30 which by both systems count as fail. And then the differences between the OSX and Linux machines on travis. |
187f612
to
a9a5ed6
Compare
@Nachtalb First of all thank you very much for your contribution. A few weeks ago I added pylint as a linter, but I still have to configure it so that it isn't so strict. Sorry for the inconvenience. |
AppVeyor and Travis settings fixed. |
|
||
|
||
class TestApiClients(TestCase): | ||
client_mapping = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The #44 changes have been merged. Adds lolibooru too.
I didn't know zest.releaser I really like the idea. Thanks! |
This PR basically introduces a new way of writing tests. Instead of a single file at the project root, we use pythons
unittest
lib (in this caseunittest2
because we want the same support for py2.7 and py3.6).Additionally, I fixed a view things with the
setup.py
and the documentation.setup.py
should not import anything from the project itself because it leads to errors like not being able to usepython setup.py install/develop
because it tries to importrequests
which it wouldinstall
with either of the said commands.TheJust saw there is asphinx
requirements to build the documentation were nowhere to be found.Pipfile
. Thus, I added an extra (docs
) which installs the required packages for us.unittests2
so we can run the tests.Your intent of importing the version from your package was probably so that you won't forget to update the version string somewhere without noticing. For that, I wholeheartedly recommend
zest.releaser
https://pypi.org/project/zest.releaser/. This package makes life as a developer easy by removing the whole hassle of releasing stuff.Before you release a package you can run
longtest
to check if the readme and changelog markup is correct and then you runfullrelease
which does the whole release pipeline.