mirror of
https://github.com/ModOrganizer2/modorganizer-plugin_python.git
synced 2026-07-27 14:03:33 -07:00
* Expose INVALID_HANDLE_VALUE as mobase.INVALID_HANDLE_VALUE. * Add tests for startApplication() returning INVALID_HANDLE_VALUE. * Clean tests and generate stub files for them.
15 lines
412 B
Python
15 lines
412 B
Python
import pytest
|
|
|
|
import mobase
|
|
|
|
m = pytest.importorskip("mobase_tests.organizer")
|
|
|
|
|
|
def test_getters():
|
|
o: mobase.IOrganizer = m.organizer()
|
|
assert o.profileName() == "profile"
|
|
assert o.startApplication("valid.exe") == 4654
|
|
assert o.startApplication("invalid.exe") == mobase.INVALID_HANDLE_VALUE
|
|
assert o.waitForApplication(42) == (False, -1)
|
|
assert o.waitForApplication(4654) == (True, 0)
|