Skip to content

Commit

Permalink
test: fix test suite failure if the database isn't installed (#740)
Browse files Browse the repository at this point in the history
Closes #734
  • Loading branch information
whot authored Jul 14, 2024
1 parent f19a833 commit c3313bc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/test_libwacom.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,13 +431,12 @@ def create_uinput(name, vid, pid):
@pytest.mark.parametrize(
"fallback", (WacomDatabase.Fallback.NONE, WacomDatabase.Fallback.GENERIC)
)
def test_new_from_path_known_device(fallback):
def test_new_from_path_known_device(db, fallback):
name = "Wacom Intuos4 WL"
vid = 0x056A
pid = 0x00BC
uinput = create_uinput(name, vid, pid)

db = WacomDatabase()
dev = db.new_from_path(
uinput.devnode, fallback=fallback
) # fallback has no effect here
Expand All @@ -450,13 +449,12 @@ def test_new_from_path_known_device(fallback):
@pytest.mark.parametrize(
"fallback", (WacomDatabase.Fallback.NONE, WacomDatabase.Fallback.GENERIC)
)
def test_new_from_path_unknown_device(fallback):
def test_new_from_path_unknown_device(db, fallback):
name = "Unknown device"
vid = 0x1234
pid = 0xABAC
uinput = create_uinput(name, vid, pid)

db = WacomDatabase()
dev = db.new_from_path(
uinput.devnode, fallback=fallback
) # fallback has no effect here
Expand Down

0 comments on commit c3313bc

Please sign in to comment.