File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ PYTHON =python
2+ TSCRIPT =fs/tests/runner.py
3+
4+ all : test
5+
6+ clean :
7+ rm -f ` find . -type f -name \* .py[co]`
8+ rm -f ` find . -type f -name \* .so`
9+ rm -f ` find . -type f -name \* .~`
10+ rm -f ` find . -type f -name \* .orig`
11+ rm -f ` find . -type f -name \* .bak`
12+ rm -f ` find . -type f -name \* .rej`
13+ rm -rf ` find . -type d -name __pycache__`
14+ rm -rf * .egg-info
15+ rm -rf build
16+ rm -rf dist
17+
18+ install :
19+ $(PYTHON ) setup.py build
20+ $(PYTHON ) setup.py develop
21+
22+ test : install
23+ $(PYTHON ) $(TSCRIPT )
Original file line number Diff line number Diff line change 1+ import os
2+ import sys
3+ import unittest
4+
5+ VERBOSITY = 2
6+
7+ HERE = os .path .abspath (os .path .dirname (__file__ ))
8+ testmodules = [os .path .splitext (x )[0 ] for x in os .listdir (HERE )
9+ if x .endswith ('.py' ) and x .startswith ('test_' )]
10+ suite = unittest .TestSuite ()
11+ for tm in testmodules :
12+ suite .addTest (unittest .defaultTestLoader .loadTestsFromName (tm ))
13+ result = unittest .TextTestRunner (verbosity = VERBOSITY ).run (suite )
14+ success = result .wasSuccessful ()
15+ sys .exit (0 if success else 1 )
You can’t perform that action at this time.
0 commit comments