Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
HardenedBSD
HardenedBSD
Commits
864ea9ab
Commit
864ea9ab
authored
Jan 25, 2023
by
Alexander V. Chernikov
Browse files
pytest: add an example test fetching test directory and ATF vars.
MFC after: 2 weeks
parent
f5924ad8
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/examples/test_examples.py
View file @
864ea9ab
...
...
@@ -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
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment