mirror of
https://github.com/progval/Limnoria.git
synced 2025-04-26 04:51:06 -05:00
Unix: disable ipv6 test if ipv6 is disabled (eg. Travis).
This commit is contained in:
parent
b02a124398
commit
0d7714d490
@ -28,11 +28,12 @@
|
|||||||
###
|
###
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import socket
|
||||||
|
|
||||||
from supybot.test import *
|
from supybot.test import *
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from unittest import skipIf
|
from unittest import skip, skipIf
|
||||||
except ImportError:
|
except ImportError:
|
||||||
def skipUnlessSpell(f):
|
def skipUnlessSpell(f):
|
||||||
return None
|
return None
|
||||||
@ -48,12 +49,23 @@ else:
|
|||||||
'aspell/ispell not available.')
|
'aspell/ispell not available.')
|
||||||
skipUnlessFortune = skipIf(utils.findBinaryInPath('fortune') is None,
|
skipUnlessFortune = skipIf(utils.findBinaryInPath('fortune') is None,
|
||||||
'fortune not available.')
|
'fortune not available.')
|
||||||
skipUnlessPing = skipIf(
|
|
||||||
utils.findBinaryInPath('ping') is None or not setuid,
|
if network:
|
||||||
'ping not available.')
|
skipUnlessPing = skipIf(
|
||||||
skipUnlessPing6 = skipIf(
|
utils.findBinaryInPath('ping') is None or not setuid,
|
||||||
utils.findBinaryInPath('ping6') is None or not setuid,
|
'ping not available.')
|
||||||
'ping6 not available.')
|
if socket.has_ipv6:
|
||||||
|
skipUnlessPing6 = skipIf(
|
||||||
|
utils.findBinaryInPath('ping6') is None or not setuid,
|
||||||
|
'ping6 not available.')
|
||||||
|
else:
|
||||||
|
skipUnlessPing6 = skip(
|
||||||
|
'IPv6 not available.')
|
||||||
|
else:
|
||||||
|
skipUnlessPing = skip(
|
||||||
|
'network not available.')
|
||||||
|
skipUnlessPing6 = skip(
|
||||||
|
'network not available.')
|
||||||
|
|
||||||
class UnixConfigTestCase(ChannelPluginTestCase):
|
class UnixConfigTestCase(ChannelPluginTestCase):
|
||||||
plugins = ('Unix',)
|
plugins = ('Unix',)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user