コード例 #1
0
ファイル: test_leakfinder.py プロジェクト: Debug-Orz/Sypy
def test_nested_remember_forget_2():
    p2 = leakfinder.start_tracking_allocations()
    x = 1234
    leakfinder.remember_malloc(x)
    py.test.raises(leakfinder.MallocMismatch,
                   leakfinder.stop_tracking_allocations, True, prev=p2)
    leakfinder.stop_tracking_allocations(True)
コード例 #2
0
def test_nested_remember_forget_1():
    leakfinder.start_tracking_allocations()
    x = 1234
    leakfinder.remember_malloc(x)
    p2 = leakfinder.start_tracking_allocations()
    leakfinder.stop_tracking_allocations(True, prev=p2)
    py.test.raises(leakfinder.MallocMismatch,
                   leakfinder.stop_tracking_allocations, True)
コード例 #3
0
ファイル: test_leakfinder.py プロジェクト: Debug-Orz/Sypy
def test_traceback():
    leakfinder.start_tracking_allocations()
    x = 1234
    leakfinder.remember_malloc(x)
    res = leakfinder.stop_tracking_allocations(check=False)
    assert res.keys() == [x]
    print res[x]
    assert isinstance(res[x], str)
    assert 'test_traceback' in res[x]
    assert 'leakfinder.remember_malloc(x)' in res[x]
コード例 #4
0
def test_traceback():
    leakfinder.start_tracking_allocations()
    x = 1234
    leakfinder.remember_malloc(x)
    res = leakfinder.stop_tracking_allocations(check=False)
    assert res.keys() == [x]
    print res[x]
    assert isinstance(res[x], str)
    assert 'test_traceback' in res[x]
    assert 'leakfinder.remember_malloc(x)' in res[x]
コード例 #5
0
ファイル: test_leakfinder.py プロジェクト: Debug-Orz/Sypy
def test_remember_forget():
    leakfinder.start_tracking_allocations()
    x = 1234
    leakfinder.remember_malloc(x)
    py.test.raises(leakfinder.MallocMismatch,
                   leakfinder.stop_tracking_allocations, True)
コード例 #6
0
ファイル: test_leakfinder.py プロジェクト: Debug-Orz/Sypy
def test_remember_free():
    leakfinder.start_tracking_allocations()
    x = 1234
    leakfinder.remember_malloc(x)
    leakfinder.remember_free(x)
    leakfinder.stop_tracking_allocations(True)
コード例 #7
0
def test_remember_forget():
    leakfinder.start_tracking_allocations()
    x = 1234
    leakfinder.remember_malloc(x)
    py.test.raises(leakfinder.MallocMismatch,
                   leakfinder.stop_tracking_allocations, True)
コード例 #8
0
def test_remember_free():
    leakfinder.start_tracking_allocations()
    x = 1234
    leakfinder.remember_malloc(x)
    leakfinder.remember_free(x)
    leakfinder.stop_tracking_allocations(True)