mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-04-18 06:20:40 +02:00
test: if we fail to load liboeffis.so, skip the rest of the pytests
This gives us a nicer behavior when (semi-intentionally) running pytest in the source directory.
This commit is contained in:
parent
6179c91580
commit
4b77664dc1
1 changed files with 8 additions and 0 deletions
|
|
@ -422,3 +422,11 @@ def test_version_compare():
|
|||
assert not version_at_least("1.0", "1.1")
|
||||
assert not version_at_least("1.0.2", "1.0.3")
|
||||
assert not version_at_least("1.0.2.dev1234", "1.0.3")
|
||||
|
||||
|
||||
# Try loading the instance once, if that fails we're probably in
|
||||
# the source directory so let's skip everything.
|
||||
try:
|
||||
LibOeffis.instance()
|
||||
except OSError:
|
||||
pytest.skip(allow_module_level=True)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue