File tree Expand file tree Collapse file tree 3 files changed +30
-5
lines changed
Expand file tree Collapse file tree 3 files changed +30
-5
lines changed Original file line number Diff line number Diff line change 99install :
1010 - pip install coveralls
1111script :
12- make test
12+ coverage run tests/run.py
1313after_success :
1414 coveralls
Original file line number Diff line number Diff line change 1414 pylint -E telegram
1515
1616test :
17- @- $(foreach TEST, $(wildcard tests/test_* .py) , python $(TEST ) ;)
18-
19- coverage :
20- @- $(foreach TEST, $(wildcard tests/test_* .py) , coverage run $(TEST ) ;)
17+ python tests/run.py
2118
2219help :
2320 @echo " Available targets:"
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python
2+ #
3+ # A library that provides a Python interface to the Telegram Bot API
4+ # Copyright (C) 2015 Leandro Toledo de Souza <leandrotoeldodesouza@gmail.com>
5+ #
6+ # This program is free software: you can redistribute it and/or modify
7+ # it under the terms of the GNU General Public License as published by
8+ # the Free Software Foundation, either version 3 of the License, or
9+ # (at your option) any later version.
10+ #
11+ # This program is distributed in the hope that it will be useful,
12+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
13+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+ # GNU General Public License for more details.
15+ #
16+ # You should have received a copy of the GNU General Public License
17+ # along with this program. If not, see [http://www.gnu.org/licenses/].
18+
19+ import os
20+ import glob
21+ import unittest
22+
23+ suite = unittest .TestSuite ()
24+ for test_file in glob .glob ('tests/test_*.py' ):
25+ test_module = os .path .basename (test_file ).replace ('.py' , '' )
26+ suite .addTest (unittest .defaultTestLoader .loadTestsFromName (test_module ))
27+
28+ unittest .TextTestRunner ().run (suite )
You can’t perform that action at this time.
0 commit comments