From 864ea9abfb98493a157dc17be17c428080843bdd Mon Sep 17 00:00:00 2001 From: "Alexander V. Chernikov" Date: Wed, 25 Jan 2023 13:55:33 +0000 Subject: [PATCH] pytest: add an example test fetching test directory and ATF vars. MFC after: 2 weeks --- tests/examples/test_examples.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/examples/test_examples.py b/tests/examples/test_examples.py index 13fdcc420f0e..fe9ae0a72cf2 100644 --- a/tests/examples/test_examples.py +++ b/tests/examples/test_examples.py @@ -49,6 +49,16 @@ def test_one(self): def test_two(self): pass + @pytest.mark.skip(reason="comment me to run the test") + def test_get_properties(self, request): + """Shows fetching of test src dir and ATF-set variables""" + print() + print("SRC_DIR={}".format(request.fspath.dirname)) + print("ATF VARS:") + for k, v in self.atf_vars.items(): + print(" {}: {}".format(k, v)) + print() + @pytest.mark.skip(reason="comment me to run the test") @pytest.mark.require_user("unprivileged") def test_syscall_failure(self):