|
@@ 74-102 (lines=29) @@
|
| 71 |
|
assert not self.manager.is_running(application) |
| 72 |
|
|
| 73 |
|
|
| 74 |
|
class TestWindowsManager: |
| 75 |
|
|
| 76 |
|
"""Unit tests for the Windows manager class.""" |
| 77 |
|
|
| 78 |
|
manager = get_manager('Windows') |
| 79 |
|
|
| 80 |
|
def test_init(self): |
| 81 |
|
"""Verify the OS is detected correctly.""" |
| 82 |
|
assert isinstance(self.manager, WindowsManager) |
| 83 |
|
|
| 84 |
|
def test_is_running_false(self): |
| 85 |
|
"""Verify a process can be detected as not running.""" |
| 86 |
|
pytest.skip("TODO: implement test") |
| 87 |
|
application = Application('fake-program-for-mine') |
| 88 |
|
application.versions.windows = 'FakeProgramForMine.exe' |
| 89 |
|
assert False is self.manager.is_running(application) |
| 90 |
|
|
| 91 |
|
@pytest.mark.windows_only |
| 92 |
|
def test_is_running_true(self): |
| 93 |
|
"""Verify a process can be detected as running.""" |
| 94 |
|
pytest.skip("TODO: implement test") |
| 95 |
|
application = Application('explorer') |
| 96 |
|
application.versions.windows = 'explorer.exe' |
| 97 |
|
assert True is self.manager.is_running(application) |
| 98 |
|
|
| 99 |
|
def test_is_running_none(self): |
| 100 |
|
"""Verify a process can be detected as untracked.""" |
| 101 |
|
application = Application('fake-program-for-mine') |
| 102 |
|
assert None is self.manager.is_running(application) |
| 103 |
|
|
|
@@ 9-34 (lines=26) @@
|
| 6 |
|
from mine.application import Application |
| 7 |
|
|
| 8 |
|
|
| 9 |
|
class TestLinuxManager: |
| 10 |
|
|
| 11 |
|
"""Unit tests for the Linux manager class.""" |
| 12 |
|
|
| 13 |
|
manager = get_manager('Linux') |
| 14 |
|
|
| 15 |
|
def test_init(self): |
| 16 |
|
"""Verify the OS is detected correctly.""" |
| 17 |
|
assert isinstance(self.manager, LinuxManager) |
| 18 |
|
|
| 19 |
|
def test_is_running_false(self): |
| 20 |
|
"""Verify a process can be detected as not running.""" |
| 21 |
|
pytest.skip("TODO: implement test") |
| 22 |
|
application = Application('fake-program-for-mine') |
| 23 |
|
application.versions.linux = 'fake_program_for_mine.sh' |
| 24 |
|
assert False is self.manager.is_running(application) |
| 25 |
|
|
| 26 |
|
@pytest.mark.linux_only |
| 27 |
|
def test_is_running_true(self): |
| 28 |
|
"""Verify a process can be detected as running.""" |
| 29 |
|
pytest.skip("TODO: implement test") |
| 30 |
|
|
| 31 |
|
def test_is_running_none(self): |
| 32 |
|
"""Verify a process can be detected as untracked.""" |
| 33 |
|
application = Application('fake-program-for-mine') |
| 34 |
|
assert None is self.manager.is_running(application) |
| 35 |
|
|
| 36 |
|
|
| 37 |
|
class TestMacManager: |