X Tutup
Skip to content

Commit 64ca4d7

Browse files
committed
Fix travis, this time for real
1 parent 6d7542c commit 64ca4d7

File tree

3 files changed

+30
-5
lines changed

3 files changed

+30
-5
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ python:
99
install:
1010
- pip install coveralls
1111
script:
12-
make test
12+
coverage run tests/run.py
1313
after_success:
1414
coveralls

Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ lint:
1414
pylint -E telegram
1515

1616
test:
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

2219
help:
2320
@echo "Available targets:"

tests/run.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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)

0 commit comments

Comments
 (0)
X Tutup