From ec897efbbcdfe4a72ae8f70f82072e03b521bb26 Mon Sep 17 00:00:00 2001
From: caron <j.caron@fz-juelich.de>
Date: Wed, 4 Mar 2020 10:33:06 +0100
Subject: [PATCH] Hopefully a fix to test_function Now using the before_script
 again due to problems with test_requires not used by pytest (and it not being
 installed before being used)

---
 .gitlab-ci.yml | 5 ++---
 setup.cfg      | 6 +++---
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3fa0cc2..5e56286 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,8 +1,8 @@
 before_script:
     # Install requirements for empyre:
     - conda env create -q # -q: quiet/ no progressbar, because it spams the log!
-    - conda init bash
-    - source ~/.bashrc
+    - conda init bash  # needed from conda 4.4 onwards, see https://stackoverflow.com/a/55507956/2286972
+    - source ~/.bashrc  # Reldad bashrc to apply changes made by conda init
     - conda activate empyre
     - conda info --envs
     # Install jutil via deploy token access:  # TODO: still needed?
@@ -23,7 +23,6 @@ test_style:
 test_function:
     stage: test
     image: continuumio/miniconda3:latest
-    before_script: []
     script:
         # Execute all tests and also check coverage with --cov:
         - python setup.py test --addopts "--cov"
diff --git a/setup.cfg b/setup.cfg
index 3fb8bbb..316c118 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -43,8 +43,8 @@ tests_require =
     pytest-flake8
     pytest-runner
 install_requires =
-    numpy>=1.17
-    matplotlib>=3
+    numpy >= 1.17
+    matplotlib >= 3
     scikit-image
     tqdm
     scipy
@@ -70,7 +70,7 @@ all =
 # CONFIGURATION FOR TESTING:
 
 [aliases]
-test=pytest
+test = pytest
 
 [coverage:run]
 branch = True
-- 
GitLab