# Testing with unittest
{id: testing-with-unittest}

## Use a module
{id: test-use-module}


We have a module called `mymath` that has two methods: `add` and `div`.


```
import mymath
print( mymath.add(2, 3) )
print( mymath.div(6, 2) )
```

![](examples/testing/run_mymath.py)


## Test a module
{id: test-module}

![](examples/testing/test_mymath.py)


## The tested module
{id: tested-module}

![](examples/testing/mymath.py)


## Testing - skeleton
{id: test-skeleton}

![](examples/testing/skeleton.py)


## Testing
{id: test}

![](examples/testing/test_case.py)


## Test examples
{id: test-example}

* [pylev](https://github.com/toastdriven/pylev) unittest
* [weighted-levenshtein](https://github.com/infoscout/weighted-levenshtein.git)

