Work around https://github.com/travis-ci/travis-ci/issues/3080 as pypy throws if 'ping' can't be executed

This commit is contained in:
Eduard Braun 2017-02-22 22:07:17 +01:00
parent 0f6d9be4e2
commit f7d6406d38

View file

@ -2434,6 +2434,11 @@ class EmbedRasters(unittest.TestCase):
import os import os
import platform import platform
# work around https://github.com/travis-ci/travis-ci/issues/3080 as pypy throws if 'ping' can't be executed
import distutils.spawn
if not distutils.spawn.find_executable('ping'):
return -1
system = platform.system().lower() system = platform.system().lower()
ping_count = '-n' if system == 'windows' else '-c' ping_count = '-n' if system == 'windows' else '-c'
dev_null = 'NUL' if system == 'windows' else '/dev/null' dev_null = 'NUL' if system == 'windows' else '/dev/null'