added coverage files to ignore

This commit is contained in:
Richard Feistenauer 2019-01-31 15:56:17 +01:00
parent d3d98940e8
commit 7b37953903
2 changed files with 23 additions and 1 deletions

4
.gitignore vendored
View File

@ -1,3 +1,5 @@
.idea/
*.pyc__pycache__
__pycache__
__pycache__
.coverage
htmlcov/

20
test/test_state.py Normal file
View File

@ -0,0 +1,20 @@
import sys
sys.path.append('../src')
import cellular_automaton.ca_cell_state as cs
import unittest
class TestState(unittest.TestCase):
def test_state_slots(self):
cell_state = cs.CellState([0])
cell_state.set_status_of_iteration([1], 0)
cell_state.set_status_of_iteration([2], 1)
cell_state.set_status_of_iteration([3], 2)
self.assertEqual(cell_state.get_status_of_iteration(0), [3])
if __name__ == '__main__':
unittest.main()