From 45c831f1399bb8199e2ec297ffe98c91a1b960f3 Mon Sep 17 00:00:00 2001 From: Tim Orling Date: Wed, 5 Oct 2016 11:07:02 -0700 Subject: test_epel-rpm-macros-6-14.py: compare to nil macro Signed-off-by: Tim Orling --- tests/test_epel-rpm-macros-6-14.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/test_epel-rpm-macros-6-14.py b/tests/test_epel-rpm-macros-6-14.py index 85adf8d..d4c1df7 100644 --- a/tests/test_epel-rpm-macros-6-14.py +++ b/tests/test_epel-rpm-macros-6-14.py @@ -32,8 +32,14 @@ class TestPython3Stubs: output = Popen(cmd, stdout=PIPE).communicate()[0] return output - def test_py3_build_macro(self, py3_build_macro): - assert py3_build_macro != '\n' + @pytest.fixture + def nil_macro(self): + cmd = shlex.split("rpm -E %{nil}") + output = Popen(cmd, stdout=PIPE).communicate()[0] + return output + + def test_py3_build_macro(self, py3_build_macro, nil_macro): + assert py3_build_macro != nil_macro - def test_py3_install_macro(self, py3_install_macro): - assert py3_install_macro != '\n' + def test_py3_install_macro(self, py3_install_macro, nil_macro): + assert py3_install_macro != nil_macro -- cgit