Skip to content

Commit ff013d2

Browse files
committed
Use module wrapper for unit tests
1 parent 2fd713e commit ff013d2

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

python/makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ test: alldata tests/testdata/__init__.py
3232
$(PYTHON) -m phonenumbers.re_util
3333
$(PYTHON) -m phonenumbers.unicode_util
3434
$(PYTHON) -m phonenumbers.geocoder
35-
$(PYTHON) -m tests.__init__
35+
$(PYTHON) -m testwrapper
3636

3737
# Coverage; requires coverage module
3838
COVERAGE=$(shell hash python-coverage 2>&- && echo python-coverage || echo coverage)
@@ -43,7 +43,7 @@ coverage_clean:
4343
coverage_generate:
4444
$(COVERAGE) -x phonenumbers/re_util.py
4545
$(COVERAGE) -x phonenumbers/unicode_util.py
46-
$(COVERAGE) -x tests/__init__.py
46+
$(COVERAGE) -x testwrapper.py
4747
coverage_report:
4848
$(COVERAGE) -m -r $(COVERAGE_FILES)
4949
coverage_annotate:

python/testwrapper.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env python
2+
import unittest
3+
from tests import *
4+
5+
if __name__ == '__main__':
6+
unittest.main()

0 commit comments

Comments
 (0)