From fd223136db3f275c76673ab46c168d58ed60eec9 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Mon, 11 Jan 2021 12:42:52 -0500 Subject: [PATCH] Avoid breaking non-Windows with test_windows --- src/allmydata/test/test_windows.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/allmydata/test/test_windows.py b/src/allmydata/test/test_windows.py index 02646a32f..8d8026584 100644 --- a/src/allmydata/test/test_windows.py +++ b/src/allmydata/test/test_windows.py @@ -69,10 +69,6 @@ from .common import ( SyncTestCase, ) -from ..windows.fixups import ( - get_argv, -) - slow_settings = settings( suppress_health_check=[HealthCheck.too_slow], deadline=None, @@ -87,9 +83,15 @@ class GetArgvTests(SyncTestCase): """ ``get_argv`` returns a list of unicode strings """ + # Hide the ``allmydata.windows.fixups.get_argv`` import here so it + # doesn't cause failures on non-Windows platforms. + from ..windows.fixups import ( + get_argv, + ) + argv = get_argv() + # We don't know what this process's command line was so we just make # structural assertions here. - argv = get_argv() self.assertThat( argv, MatchesAll(