示例#1
0
def test_fingerprinting(reference, equal, different):
    assert str(Fingerprint(reference)) == str(Fingerprint(equal))
    assert str(Fingerprint(reference)) != str(Fingerprint(different))
示例#2
0
def test_unsupported_fingerprinting(obj):
    with pytest.raises(FingerprintError):
        Fingerprint(obj)
示例#3
0
def test_fails_for_lambda_expression():
    with pytest.raises(FingerprintError):
        Fingerprint(lambda x: x)