Capture current mission, AI, map and administration development
Include the current addon, terrain integrations, tools, regression tests and recorded development evidence.
This commit is contained in:
@@ -10,6 +10,26 @@ import headless_game as runner
|
||||
|
||||
|
||||
class GameRunnerTests(unittest.TestCase):
|
||||
def test_exact_native_smartcard_helper_does_not_own_a_wine_prefix(self):
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
proc = self.process(Path(directory), b'scdaemon\0--multi-server\0', comm='scdaemon')
|
||||
self.assertFalse(runner.prefix_process_candidate(proc))
|
||||
(proc/'cmdline').write_bytes(b'scdaemon\0--multi-server\0proton\0')
|
||||
self.assertTrue(runner.prefix_process_candidate(proc))
|
||||
(proc/'cmdline').write_bytes(b'scdaemon\0')
|
||||
with self.assertRaisesRegex(ValueError, 'Cannot classify'):
|
||||
runner.prefix_process_candidate(proc)
|
||||
|
||||
def test_only_confirmed_exited_zombie_can_have_empty_process_identity(self):
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
proc = self.process(Path(directory), b'', comm='codex')
|
||||
(proc/'status').write_text('Name:\tcodex\nState:\tZ (zombie)\n')
|
||||
self.assertFalse(runner.prefix_process_candidate(proc))
|
||||
for status in ('State:\tS (sleeping)\n', '', 'State:\tR (running)\n'):
|
||||
(proc/'status').write_text(status)
|
||||
with self.assertRaisesRegex(ValueError, 'Cannot classify'):
|
||||
runner.prefix_process_candidate(proc)
|
||||
|
||||
def process(self, root, command, comm='wine', pid='123'):
|
||||
proc = root/pid
|
||||
proc.mkdir()
|
||||
|
||||
Reference in New Issue
Block a user