Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 3
0
def test_is_internet_on():
    if IP:
        assert network.is_internet_on()
    else:
        assert not network.is_internet_on()
Exemplo n.º 4
0
def test_is_internet_on():
    if IP:
        assert network.is_internet_on()
    else:
        assert not network.is_internet_on()