コード例 #1
0
 def test_1(self):
     # test in current process
     me = singleton.SingleInstance(flavor_id="test-1")
     del me  # now the lock should be removed
     self.assertTrue(True)
コード例 #2
0
def f(flavor_id):
    return singleton.SingleInstance(flavor_id=flavor_id, exit_code=1)