Skip to content

Latest commit

 

History

History
 
 

tests

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Unit tests

codecov

how-to

  1. Install pytest,
pip3 install pytest pytest-cov pytest-codecov gitpython
  1. Run pytest,
pytest tests --cov --cov-report term --cov-report html

Or run failed tests only,

pytest tests --cov --cov-report term --cov-report html --last-failed

Or run for specific py file,

pytest tests/test_emotion.py --cov --cov-report term --cov-report html

Or run for specific function,

pytest tests/test_emotion.py::test_multinomial --cov --cov-report term --cov-report html
  1. Upload to CodeCov, https://app.codecov.io/gh/huseinzol05/malaya
CODECOV_TOKEN=
pytest tests --cov --codecov --codecov-token=$CODECOV_TOKEN