From 68591860690241b657757a4e31117fc39c8aef1d Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sat, 9 Feb 2019 22:38:29 +0000 Subject: [PATCH] tests: disable affinity_test on Travis :/ --- tests/ansible/tests/affinity_test.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/ansible/tests/affinity_test.py b/tests/ansible/tests/affinity_test.py index 68be27dc..d898c782 100644 --- a/tests/ansible/tests/affinity_test.py +++ b/tests/ansible/tests/affinity_test.py @@ -1,6 +1,7 @@ -import tempfile +import multiprocessing import os +import tempfile import mock import unittest2 @@ -11,8 +12,11 @@ import ansible_mitogen.affinity @unittest2.skipIf( - reason='Linux only', - condition=os.uname()[0] != 'Linux' + reason='Linux/SMP only', + condition=(not ( + os.uname()[0] == 'Linux' and + multiprocessing.cpu_count() >= 4 + )) ) class LinuxPolicyTest(testlib.TestCase): klass = ansible_mitogen.affinity.LinuxPolicy