Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hugovk/upgrade-unittest

Script to upgrade some Python unittest assert methods to be more useful
https://github.com/hugovk/upgrade-unittest

assert assertions python unittest upgrade

Last synced: 14 days ago
JSON representation

Script to upgrade some Python unittest assert methods to be more useful

Awesome Lists containing this project

README

        

# upgrade-unittest

[![Test](https://github.com/hugovk/upgrade-unittest/actions/workflows/test.yml/badge.svg)](https://github.com/hugovk/upgrade-unittest/actions/workflows/test.yml)

Script to upgrade some Python unittest assert methods to be more useful.

It's just a bunch of sed scripts rather than parsing the AST, and isn't
good with multiline or complex statements, so always review the output.

```sh
upgrade-unittest.sh test.py

upgrade-unittest.sh *.py

upgrade-unittest.sh `find . -name "*.py"`
```

## See also

* https://github.com/isidentical/teyit
* https://github.com/jparise/flake8-assertive