예제 #1
0
def test_this_process():
    """ Do some assumption in the current process """
    assert single()
예제 #2
0
 def check_im_the_one():
     separate_proc_result = single(flavor='process',
                                   ensure_process_running=True)
     q.put(separate_proc_result)
예제 #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
예제 #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
예제 #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