コード例 #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
ファイル: is_net_back.py プロジェクト: the7day/jabbapylib
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
ファイル: test_network.py プロジェクト: the7day/jabbapylib
def test_is_internet_on():
    if IP:
        assert network.is_internet_on()
    else:
        assert not network.is_internet_on()