Skip to content
Snippets Groups Projects
Commit 0f7dc5b0 authored by Klaas Kliffen's avatar Klaas Kliffen :satellite:
Browse files

Add example tests

parent c4b73e1a
No related branches found
No related tags found
1 merge request!5Resolve CWG-11 "Features/ add tox"
Pipeline #39020 passed
dist/* dist/*
*.egg-info *.egg-info
*.pyc *.pyc
.coverage
...@@ -2,3 +2,5 @@ black ...@@ -2,3 +2,5 @@ black
build build
flake8 flake8
pylint pylint
pytest
pytest-cov
"""Testing of the Cool Module"""
from unittest import TestCase
from map.cool_module import greeter
class TestCoolModule(TestCase):
"""Test Case of the Cool Module"""
def test_greeter(self):
"""Testing that the greeter does not crash"""
greeter()
self.assertEqual(2 + 2, 4)
...@@ -16,6 +16,7 @@ deps = ...@@ -16,6 +16,7 @@ deps =
-r{toxinidir}/tests/requirements.txt -r{toxinidir}/tests/requirements.txt
commands = commands =
{envpython} --version {envpython} --version
{envpython} -m pytest --cov=map
# Use generative name and command prefixes to reuse the same virtualenv # Use generative name and command prefixes to reuse the same virtualenv
# for all linting jobs. # for all linting jobs.
...@@ -28,7 +29,7 @@ commands = ...@@ -28,7 +29,7 @@ commands =
black: {envpython} -m black --version black: {envpython} -m black --version
black: {envpython} -m black --check --diff . black: {envpython} -m black --check --diff .
pylint: {envpython} -m pylint --version pylint: {envpython} -m pylint --version
pylint: {envpython} -m pylint map pylint: {envpython} -m pylint map tests
[testenv:build] [testenv:build]
usedevelop = False usedevelop = False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment