Skip to content
This repository has been archived by the owner on Sep 24, 2019. It is now read-only.

Add tests #14

Open
zachkont opened this issue Oct 17, 2017 · 5 comments
Open

Add tests #14

zachkont opened this issue Oct 17, 2017 · 5 comments

Comments

@zachkont
Copy link
Owner

This is mostly addressed to people new in python and/or github

Every good project should include some unit testing. Here are some useful links about it:

Please submit your tests at the tests branch, and keep it at 1 commit per test.
Comments will be appreciated.

@questionmarcus
Copy link

Keen on giving a hand where I can. I've a little experience in Python but not in unit testing.

What kind of tests have you got in mind?

@alaskaa
Copy link

alaskaa commented Oct 17, 2017

I would also be happy to help up and brush up on my unit testing knowledge! I'm also quite new but this sounds manageable and @questionmarcus and me could write different tests? Happy to discuss here.

@alaskaa
Copy link

alaskaa commented Oct 17, 2017

At the expense of this being a silly newbie question: Once we have everything installed, set up, tokens set up, own bot created etc and the telegram bot AnnouncerDude set up - in order to write the tests, what are we actually supposed to run? (I've put the tokens into the settings.py and changed the name as well.)

@mvi-x
Copy link

mvi-x commented Oct 21, 2017

Have you decided what you'd like to use for tests? Unittest / pytest / something else?

@zachkont
Copy link
Owner Author

@mvi-x I was thinking unit tests to begin with but pytest looks interesting. The end goal would be to have a full start-to-end test scenario since the functionality is not that extensive, including testing of commands and of the automated updates (probably by deleting the latest entry in the json files).

Generally, the point is to fully automate pull requests, hopefully.

@questionmarcus & @alaskaa I guess you could start by writing some unit tests for the updater.py functions. As simple as they may be, it would be a solid start.

@alaskaa the links that I have included are a good start for your question (no question is silly btw) so I suggest giving those a look. Also, pytest that @mvi-x mentioned looks nice, I have never used it though. I probably should have set up a base for you guys, sorry. I'll try doing that next weekend if none has pushed anything yet

zachkont added a commit that referenced this issue Oct 25, 2017
Adds tests for utils.py as proposed in #14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants