for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
import unittest
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
class SomeClass: def some_method(self): """Do x and return foo."""
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.
from foil.counting import count_by
class TestCounting(unittest.TestCase):
def test_count_by(self):
field_name = 'field'
records = [{field_name: 'a'}, {field_name: 'b'}, {field_name: 'a'}]
expected = {'a': 2, 'b': 1}
result = count_by(records, field_name)
self.assertDictEqual(expected, result)
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.