Esempio n. 1
0
def test_this_process():
    """ Do some assumption in the current process """
    assert single()
Esempio n. 2
0
 def check_im_the_one():
     separate_proc_result = single(flavor='process',
                                   ensure_process_running=True)
     q.put(separate_proc_result)
Esempio n. 3
0
def test_all_valid_from_this_process():
    assert single(allow_all_from_this_process=True) is True
    assert single(allow_all_from_this_process=True) is True
Esempio n. 4
0
def test_flavors():
    assert single(flavor='first') is True
    assert single(flavor='second') is True

    assert single(flavor='first') is False
    assert single(flavor='second') is False
Esempio n. 5
0
def test_multiple_times():
    single()  # does it exists? however create a lock

    second_check = single()  # here we are sure that the lock is hold
    assert second_check is False