Skip to content

Commit 40a832e

Browse files
committed
umu_test: update tests
1 parent e41393f commit 40a832e

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

umu/umu_test.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,14 @@ def tearDown(self):
181181

182182
def test_is_installed_verb_noverb(self):
183183
"""Test is_installed_verb when passed an empty verb."""
184-
verb = ""
184+
verb = []
185185

186186
with self.assertRaises(ValueError):
187187
umu_util.is_installed_verb(verb, self.test_winepfx)
188188

189189
def test_ist_installed_verb_nopfx(self):
190190
"""Test is_installed_verb when passed a non-existent pfx."""
191-
verb = "foo"
191+
verb = ["foo"]
192192
result = True
193193

194194
# Handle the None type
@@ -204,7 +204,7 @@ def test_ist_installed_verb_nopfx(self):
204204

205205
def test_is_installed_verb_nofile(self):
206206
"""Test is_installed_verb when the log file is absent."""
207-
verb = "foo"
207+
verb = ["foo"]
208208
result = True
209209

210210
result = umu_util.is_installed_verb(verb, self.test_winepfx)
@@ -216,14 +216,12 @@ def test_is_installed_verb(self):
216216
Reads the winetricks.log file within the wine prefix to find the verb
217217
that was passed from the command line.
218218
"""
219-
verb = "foo"
219+
verbs = ["foo", "bar"]
220220
wt_log = self.test_winepfx.joinpath("winetricks.log")
221221
result = False
222222

223-
with wt_log.open(mode="w", encoding="utf-8") as file:
224-
file.write(verb)
225-
226-
result = umu_util.is_installed_verb(verb, self.test_winepfx)
223+
wt_log.write_text("\n".join(verbs))
224+
result = umu_util.is_installed_verb(verbs, self.test_winepfx)
227225
self.assertTrue(result, "winetricks verb was not installed")
228226

229227
def test_is_not_winetricks_verb(self):

0 commit comments

Comments
 (0)