diff --git a/.travis.yml b/.travis.yml
index 8bed00ed8206df23a0da06bded1da6ec105aa3ac..9b355a7da2fed91e83a00bf84f8351da0d81b377 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -14,11 +14,18 @@ addons:
     update: true
 matrix:
   fast_finish: true
+  allow_failures:
+    - name: "Pystencils from pip"
   include:
     - python: 3.6
       env: DISTRIB="ubuntu" TOX_PYTHON_VERSION="py36" COVERAGE="true" LINT="false"
       before_install:
         - sudo apt-get install -y ninja-build build-essential nvidia-cuda-toolkit
+    - python: 3.6
+      name: "Pystencils from pip"
+      env: DISTRIB="ubuntu" TOX_PYTHON_VERSION="py36" COVERAGE="true" LINT="false" PYSTENCIL_FROM_PIP="true"
+      before_install:
+        - sudo apt-get install -y ninja-build build-essential nvidia-cuda-toolkit
     - name: "Conda"
       env: DISTRIB="conda" PYTHON_VERSION="3.6" COVERAGE="false" LINT="false"
       before_install:
diff --git a/tests/backends/test_torch_native_compilation.py b/tests/backends/test_torch_native_compilation.py
index b291f67c042a1b840f6c715b6c511bddd29d8d42..f552192d02eea20a2e7eea7a60b3aec5b882983a 100644
--- a/tests/backends/test_torch_native_compilation.py
+++ b/tests/backends/test_torch_native_compilation.py
@@ -194,12 +194,3 @@ def test_execute_torch_gpu():
     print(y_tensor)
     print(rtn)
 
-
-def main():
-    test_jit()
-    test_torch_native_compilation()
-    # test_generate_torch()
-    # test_execute_torch()
-
-
-main()
diff --git a/tests/test_autodiff.py b/tests/test_autodiff.py
index 8d3f5354f327c20a1f3ef3a346250bebf18e6cf8..4d917e98c08654422f596bfa1f2eed16b4db3bec 100644
--- a/tests/test_autodiff.py
+++ b/tests/test_autodiff.py
@@ -50,11 +50,3 @@ def test_simple_2d_check_raw_assignments():
         pystencils_autodiff.create_backward_assignments(
             forward_assignments, diff_mode=diff_mode)
 
-
-def main():
-    test_simple_2d_check_assignment_collection()
-    test_simple_2d_check_raw_assignments()
-
-
-if __name__ == '__main__':
-    main()
diff --git a/tests/test_tfmad.py b/tests/test_tfmad.py
index 309ec94cf5ac920e48dfc7b8cb09a6a65ee6c08a..8b1820945601e21951226a83c8590e088247611d 100644
--- a/tests/test_tfmad.py
+++ b/tests/test_tfmad.py
@@ -247,14 +247,3 @@ def test_tfmad_two_outputs():
     print(curl_op.backward_assignments)
 
 
-def main():
-    # test_tfmad_stencil()
-    # test_tfmad_two_stencils()
-    # test_tfmad_gradient_check_torch()
-    test_tfmad_gradient_check()
-    # test_tfmad_vector_input_data()
-    # test_tfmad_two_outputs()
-
-
-if __name__ == '__main__':
-    main()
diff --git a/tests/travis_install.sh b/tests/travis_install.sh
index 5eaf44ffb12584b013fbfb0332e8e22d4fea2aaa..88388647ec2647dbf4f803fc6a8cfe486326c585 100644
--- a/tests/travis_install.sh
+++ b/tests/travis_install.sh
@@ -45,8 +45,12 @@ pip install -U pip setuptools
 pip install tox
 pip install codecov
 pip install sphinx
-# use newest pystencils
-pip install git+https://github.com/mabau/pystencils.git
+
+if [[ -z "$PYSTENCIL_FROM_PIP" ]]; then
+    pip install git+https://github.com/mabau/pystencils.git
+else
+    pip install pystencils
+fi
 pip install flake8
 
 if [[ "$COVERAGE" == "true" ]]; then