mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-02-16 18:31:45 +01:00
Adding tests
This commit is contained in:
parent
779a2f6d07
commit
a0d342b338
2 changed files with 34 additions and 0 deletions
29
Makefile
Normal file
29
Makefile
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
help:
|
||||||
|
@echo " env create a development environment using virtualenv"
|
||||||
|
@echo " deps install dependencies"
|
||||||
|
@echo " clean remove unwanted stuff"
|
||||||
|
@echo " lint check style with flake8"
|
||||||
|
@echo " test run tests"
|
||||||
|
|
||||||
|
env:
|
||||||
|
sudo easy_install pip && \
|
||||||
|
pip install virtualenv && \
|
||||||
|
virtualenv env && \
|
||||||
|
. env/bin/activate && \
|
||||||
|
make deps
|
||||||
|
|
||||||
|
deps:
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -fr build
|
||||||
|
rm -fr dist
|
||||||
|
find . -name '*.pyc' -exec rm -f {} \;
|
||||||
|
find . -name '*.pyo' -exec rm -f {} \;
|
||||||
|
find . -name '*~' -exec rm -f {} \;
|
||||||
|
|
||||||
|
lint:
|
||||||
|
flake8 telegram
|
||||||
|
|
||||||
|
test:
|
||||||
|
python telegram_test.py
|
5
telegram_test.py
Normal file
5
telegram_test.py
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
testsuite = unittest.TestLoader().discover('.')
|
||||||
|
unittest.TextTestRunner(verbosity=1).run(testsuite)
|
Loading…
Add table
Reference in a new issue