From 44414dc53cf67ddfff9c4b394e26da33bfeb17ee Mon Sep 17 00:00:00 2001
From: Simon Rose <simon.rose@ess.eu>
Date: Thu, 13 Jan 2022 15:46:16 +0100
Subject: [PATCH] Moved get_env_var over to the wrapper as well

---
 tests/test_build.py |  4 ++--
 tests/utils.py      | 13 -------------
 2 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/tests/test_build.py b/tests/test_build.py
index 6983de3d..e66ed7ca 100644
--- a/tests/test_build.py
+++ b/tests/test_build.py
@@ -1,7 +1,7 @@
 import re
 from pathlib import Path
 
-from .utils import get_env_var, run_ioc_get_output
+from .utils import run_ioc_get_output
 
 MODULE_VERSION = "0.0.0+0"
 MODULE_VERSION_NO_BUILD = "0.0.0"
@@ -110,7 +110,7 @@ def test_header_install_location(wrapper):
     rc, *_ = wrapper.run_make("cellinstall")
     assert rc == 0
 
-    cell_path = get_env_var(wrapper, "E3_MODULES_INSTALL_LOCATION")
+    cell_path = wrapper.get_env_var("E3_MODULES_INSTALL_LOCATION")
 
     for ext in extensions:
         assert (Path(cell_path) / "include" / "subdir" / f"header.{ext}").is_file()
diff --git a/tests/utils.py b/tests/utils.py
index 8e875c33..d44e2112 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -2,19 +2,6 @@ import time
 
 from run_iocsh import IOC
 
-from .conftest import Wrapper
-
-
-def get_env_var(wrapper: Wrapper, var: str):
-    """
-    Fetch an environment variable from the module build environment
-    """
-    _, out, _ = wrapper.run_make("cellvars")
-    for line in out.split("\n"):
-        if line.startswith(var):
-            return line.split("=")[1].strip()
-    return ""
-
 
 def run_ioc_get_output(module, version, cell_path):
     """
-- 
GitLab