diff options
author | Alexander V. Chernikov <melifaro@FreeBSD.org> | 2023-01-25 13:55:33 +0000 |
---|---|---|
committer | Alexander V. Chernikov <melifaro@FreeBSD.org> | 2023-01-25 13:55:33 +0000 |
commit | 864ea9abfb98493a157dc17be17c428080843bdd (patch) | |
tree | 1c2e45d26a86502558083462e5e5f0ba96ca1446 /tests | |
parent | f5924ad8fde4d5e9c233b821cb6097c6a46740b5 (diff) | |
download | src-864ea9abfb98493a157dc17be17c428080843bdd.tar.gz src-864ea9abfb98493a157dc17be17c428080843bdd.zip |
pytest: add an example test fetching test directory and ATF vars.
MFC after: 2 weeks
Diffstat (limited to 'tests')
-rw-r--r-- | tests/examples/test_examples.py | 10 |
1 files changed, 10 insertions, 0 deletions
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 @@ -50,6 +50,16 @@ class TestExampleSimple(BaseTest): 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): s = socket.socket(socket.AF_INET6, socket.SOCK_STREAM) |