summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorAlexandre Pretto <anunes@thoughtworks.com>2015-01-08 19:11:51 -0200
committerPixpoa pairing <pixpoapairing@pixelated-project.org>2015-01-08 19:11:51 -0200
commit9358374cd1c542c480958f399308d02f83b15217 (patch)
tree7feee2d386da0925bd840d00886c24d999df86df /service
parentb06b794de750d972a9dff9165e203815b79c5b62 (diff)
Make it easier to run unit, integration and pep8 tests
Diffstat (limited to 'service')
-rwxr-xr-xservice/go23
-rw-r--r--service/test_requirements.txt1
2 files changed, 22 insertions, 2 deletions
diff --git a/service/go b/service/go
index 1ae838b0..241cae46 100755
--- a/service/go
+++ b/service/go
@@ -12,9 +12,28 @@ function setupjs {
cd -
}
-if [ "$1" == 'test' ]; then
- nosetests "${@:2}" test/unit
+function runIntegrationTests {
nosetests "${@:2}" test/integration
+}
+
+function runUnitTests {
+ nosetests "${@:2}" test/unit
+}
+
+function runPep8 {
+ pep8 pixelated test --ignore=E501
+}
+
+if [ "$2" == 'test' ]; then
+ runPep8
+ runUnitTests
+ runIntegrationTests
+elif [ "$1" == 'unit' ]; then
+ runUnitTests
+elif [ "$1" == 'integration' ]; then
+ runIntegrationTests
+elif [ "$1" == 'pep8' ]; then
+ runPep8
elif [ "$1" == 'setuppy' ]; then
setuppy
elif [ "$1" == 'setupjs' ]; then
diff --git a/service/test_requirements.txt b/service/test_requirements.txt
index aeba39d0..4f8bc5e3 100644
--- a/service/test_requirements.txt
+++ b/service/test_requirements.txt
@@ -7,4 +7,5 @@ httmock==1.2.2
mockito==0.5.2
funkload==1.16.1
tornado==4.0.2
+pep8==1.5.7