for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
from unittest import TestCase
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 unittest.mock import Mock
from grortir.main.pso.particle import Particle
class TestParticle(TestCase):
def test_get_the_overall_quality_po(self):
particle_mock = Mock()
particle_mock.current_quality = {'a': 2, 'b': 3, 'c': -3.1234}
result = Particle.get_the_overall_quality(particle_mock)
self.assertEqual(result, 3)
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.