(self, backend)
| 386 | ).private_key(backend) |
| 387 | |
| 388 | def test_public_key_equality(self, backend): |
| 389 | key_bytes = load_vectors_from_file( |
| 390 | os.path.join("asymmetric", "PKCS8", "unenc-dsa-pkcs8.pem"), |
| 391 | lambda pemfile: pemfile.read().encode(), |
| 392 | ) |
| 393 | key1 = serialization.load_pem_private_key(key_bytes, None).public_key() |
| 394 | key2 = serialization.load_pem_private_key(key_bytes, None).public_key() |
| 395 | key3 = DSA_KEY_2048.private_key().public_key() |
| 396 | assert key1 == key2 |
| 397 | assert key1 != key3 |
| 398 | assert key1 != object() |
| 399 | with pytest.raises(TypeError): |
| 400 | key1 < key2 # type: ignore[operator] |
| 401 | |
| 402 | def test_public_key_copy(self): |
| 403 | key_bytes = load_vectors_from_file( |
nothing calls this directly
no test coverage detected