diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 116739c0aa913d292977ece3c51c6a4cf8a0a47a..449e5e2227c63121d1aeb6c824423c4fbb4e54aa 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -74,6 +74,7 @@ ubuntu:
   script:
     - mkdir -p ~/.config/matplotlib
     - echo "backend:template" > ~/.config/matplotlib/matplotlibrc
+    - sed -i 's/--doctest-modules //g' pytest.ini
     - pytest-3 -v -m "not longrun"
   tags:
     - docker