mattjegan / django-gamification

The missing Django Gamification Package
Other
166 stars 28 forks source link

Add docstrings to tests #13

Closed mattjegan closed 6 years ago

mattjegan commented 6 years ago

The current tests require previous knowledge of the code base to understand what we are testing for. By including docstrings we make the codebase more welcoming to future contributors and decrease the risk of creating regressions.

A docstring is a way to document within the Python code. For example, given this fake test:

1. def test_sum():
2.     """Tests that the sum() function gives correct mathematical output"""
3.     assert sum([1, 2]) == 3
4.     assert sum([]) == 0

you can see the docstring on line 2, which explains what the test is aiming to test. To complete this, we'd want to have docstrings for each test_ method in our test files.

tulikavijay commented 6 years ago

Can I take this up? I'll require a bit guidance with what the tests are for and what kind...

mattjegan commented 6 years ago

Sure, no worries 😄

tulikavijay commented 6 years ago

i dont understand do i make an .md file? i made one and renamed it to .rst ...lost the structure and all :|

XFabian commented 6 years ago

Can I work on this too?

mattjegan commented 6 years ago

Sure @7Orion7, @tulikavijay is working on it at the moment but anyone is welcome to work together.