예제 #1
0
def main():
    cnt = 0
    while True:
        cnt += 1
        print '# testing...' if cnt == 1 else '# test again...'
        if network.is_internet_on(method=2):
            print '# Whoa, your net is alive!'
            play(AUDIO)
            break
        else:
            print '# no connection, waiting...'
            sleep(10)
예제 #2
0
def main():
    cnt = 0
    while True:
        cnt += 1
        print '# testing...' if cnt == 1 else '# test again...'
        if network.is_internet_on(method=2):
            print '# Whoa, your net is alive!'
            play(AUDIO)
            break
        else:
            print '# no connection, waiting...'
            sleep(10)
예제 #3
0
def test_is_internet_on():
    if IP:
        assert network.is_internet_on()
    else:
        assert not network.is_internet_on()
예제 #4
0
def test_is_internet_on():
    if IP:
        assert network.is_internet_on()
    else:
        assert not network.is_internet_on()