From 5c734daa0f502e9272e3a4e287cf07457c97c296 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 13 Oct 2020 20:20:48 -0400 Subject: [PATCH] Arm flail attempt at windows support This is a poor attempt at starting to test the new debugger support on windows systems. Kicks off #158 --- tests/test_debugger.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/tests/test_debugger.py b/tests/test_debugger.py index 227e8f5a..9bd68a7f 100644 --- a/tests/test_debugger.py +++ b/tests/test_debugger.py @@ -5,9 +5,11 @@ All these tests can be understood (somewhat) by running the equivalent `examples/debugging/` scripts manually. """ from os import path +import platform import pytest import pexpect +from pexpect import popen_spawn from conftest import repodir @@ -43,11 +45,19 @@ def spawn( arb_addr, ) -> 'pexpect.spawn': - def _spawn(cmd): - return testdir.spawn( - cmd=mk_cmd(cmd), - expect_timeout=3, - ) + if platform.system() == "Windows": + def _spawn(cmd): + return popen_spawn.PopenSpawn( + cmd=mk_cmd(cmd), + timeout=3, + ) + else: # posix + + def _spawn(cmd): + return testdir.spawn( + cmd=mk_cmd(cmd), + expect_timeout=3, + ) return _spawn