Home
last modified time | relevance | path

Searched full:pytest (Results 1 – 25 of 412) sorted by relevance

12345678910>>...17

/external/python/cryptography/tests/hazmat/primitives/
Dtest_hashes.py9 import pytest
20 @pytest.mark.requires_backend_interface(interface=HashBackend)
24 with pytest.raises(TypeError):
28 with pytest.raises(TypeError):
35 with pytest.raises(AlreadyFinalized):
38 with pytest.raises(AlreadyFinalized):
41 with pytest.raises(AlreadyFinalized):
49 @pytest.mark.supported(
53 @pytest.mark.requires_backend_interface(interface=HashBackend)
61 @pytest.mark.supported(
[all …]
Dtest_hash_vectors.py10 import pytest
19 @pytest.mark.supported(
23 @pytest.mark.requires_backend_interface(interface=HashBackend)
36 @pytest.mark.supported(
40 @pytest.mark.requires_backend_interface(interface=HashBackend)
53 @pytest.mark.supported(
57 @pytest.mark.requires_backend_interface(interface=HashBackend)
70 @pytest.mark.supported(
74 @pytest.mark.requires_backend_interface(interface=HashBackend)
87 @pytest.mark.supported(
[all …]
Dtest_ciphers.py10 import pytest
26 @pytest.mark.parametrize(("key", "keysize"), [
36 with pytest.raises(ValueError):
40 with pytest.raises(TypeError, match="key must be bytes"):
45 @pytest.mark.requires_backend_interface(interface=CipherBackend)
46 @pytest.mark.parametrize(
51 with pytest.raises(ValueError):
55 with pytest.raises(TypeError):
59 with pytest.raises(ValueError):
62 @pytest.mark.requires_backend_interface(interface=CipherBackend)
[all …]
Dtest_aead.py10 import pytest
38 @pytest.mark.skipif(
42 @pytest.mark.requires_backend_interface(interface=CipherBackend)
48 @pytest.mark.skipif(
52 @pytest.mark.requires_backend_interface(interface=CipherBackend)
59 with pytest.raises(OverflowError):
62 with pytest.raises(OverflowError):
70 with pytest.raises(TypeError):
73 with pytest.raises(ValueError):
76 @pytest.mark.parametrize(
[all …]
Dtest_block.py9 import pytest
26 @pytest.mark.requires_backend_interface(interface=CipherBackend)
46 with pytest.raises(TypeError):
50 @pytest.mark.requires_backend_interface(interface=CipherBackend)
61 with pytest.raises(AlreadyFinalized):
63 with pytest.raises(AlreadyFinalized):
68 with pytest.raises(AlreadyFinalized):
70 with pytest.raises(AlreadyFinalized):
82 with pytest.raises(AlreadyFinalized):
106 @pytest.mark.parametrize("mode", [DummyMode(), None])
[all …]
Dtest_rsa.py12 import pytest
114 pytest.skip(
119 @pytest.mark.requires_backend_interface(interface=RSABackend)
121 with pytest.raises(pytest.skip.Exception):
146 @pytest.mark.requires_backend_interface(interface=RSABackend)
148 @pytest.mark.parametrize(
164 with pytest.raises(ValueError):
169 with pytest.raises(ValueError):
175 with pytest.raises(ValueError):
180 with pytest.raises(ValueError):
[all …]
Dtest_serialization.py12 import pytest
38 @pytest.mark.requires_backend_interface(interface=RSABackend)
39 @pytest.mark.parametrize(
58 @pytest.mark.requires_backend_interface(interface=RSABackend)
59 @pytest.mark.parametrize(
86 @pytest.mark.requires_backend_interface(interface=DERSerializationBackend)
88 @pytest.mark.requires_backend_interface(interface=RSABackend)
89 @pytest.mark.parametrize(
110 @pytest.mark.requires_backend_interface(interface=DSABackend)
111 @pytest.mark.parametrize(
[all …]
Dtest_ec.py12 import pytest
47 pytest.skip(
56 pytest.skip(
67 pytest.skip(
85 @pytest.mark.requires_backend_interface(interface=EllipticCurveBackend)
87 with pytest.raises(pytest.skip.Exception):
91 @pytest.mark.requires_backend_interface(interface=EllipticCurveBackend)
93 with pytest.raises(pytest.skip.Exception):
97 @pytest.mark.requires_backend_interface(interface=EllipticCurveBackend)
99 with pytest.raises(pytest.skip.Exception):
[all …]
Dtest_padding.py7 import pytest
16 @pytest.mark.parametrize("size", [127, 4096, -2])
18 with pytest.raises(ValueError):
21 @pytest.mark.parametrize(("size", "padded"), [
31 with pytest.raises(ValueError):
37 with pytest.raises(TypeError):
40 with pytest.raises(TypeError):
43 @pytest.mark.parametrize(("size", "unpadded", "padded"), [
71 @pytest.mark.parametrize(("size", "unpadded", "padded"), [
92 with pytest.raises(AlreadyFinalized):
[all …]
Dtest_keywrap.py10 import pytest
20 @pytest.mark.requires_backend_interface(interface=CipherBackend)
22 @pytest.mark.parametrize(
30 @pytest.mark.supported(
43 @pytest.mark.parametrize(
51 @pytest.mark.supported(
62 with pytest.raises(keywrap.InvalidUnwrap):
70 @pytest.mark.supported(
79 with pytest.raises(ValueError):
82 @pytest.mark.supported(
[all …]
Dtest_cmac.py9 import pytest
42 @pytest.mark.requires_backend_interface(interface=CMACBackend)
44 @pytest.mark.supported(
49 @pytest.mark.parametrize("params", vectors_aes)
59 @pytest.mark.supported(
64 @pytest.mark.parametrize("params", vectors_aes)
74 @pytest.mark.supported(
79 @pytest.mark.parametrize("params", vectors_3des)
94 @pytest.mark.supported(
99 @pytest.mark.parametrize("params", vectors_3des)
[all …]
Dtest_x25519.py10 import pytest
25 @pytest.mark.supported(
29 @pytest.mark.requires_backend_interface(interface=DHBackend)
41 @pytest.mark.supported(
45 @pytest.mark.requires_backend_interface(interface=DHBackend)
47 @pytest.mark.parametrize(
98 with pytest.raises(ValueError):
103 with pytest.warns(utils.DeprecatedIn25):
108 with pytest.raises(ValueError):
110 with pytest.raises(ValueError):
[all …]
Dtest_dsa.py10 import pytest
38 pytest.skip(
43 @pytest.mark.requires_backend_interface(interface=DSABackend)
45 with pytest.raises(pytest.skip.Exception):
49 @pytest.mark.requires_backend_interface(interface=DSABackend)
56 with pytest.raises(ValueError):
59 @pytest.mark.parametrize(
102 @pytest.mark.parametrize(
158 with pytest.raises(ValueError):
161 @pytest.mark.parametrize(
[all …]
Dtest_dh.py11 import pytest
27 pytest.skip(
40 with pytest.raises(TypeError):
45 with pytest.raises(TypeError):
50 with pytest.raises(TypeError):
55 with pytest.raises(ValueError):
68 with pytest.raises(TypeError):
86 with pytest.raises(TypeError):
91 with pytest.raises(TypeError):
103 with pytest.raises(TypeError):
[all …]
Dtest_hmac_vectors.py9 import pytest
18 @pytest.mark.supported(
22 @pytest.mark.requires_backend_interface(interface=HMACBackend)
34 @pytest.mark.supported(
38 @pytest.mark.requires_backend_interface(interface=HMACBackend)
50 @pytest.mark.supported(
54 @pytest.mark.requires_backend_interface(interface=HMACBackend)
66 @pytest.mark.supported(
70 @pytest.mark.requires_backend_interface(interface=HMACBackend)
82 @pytest.mark.supported(
[all …]
Dtest_x448.py10 import pytest
24 @pytest.mark.supported(
28 @pytest.mark.requires_backend_interface(interface=DHBackend)
40 @pytest.mark.supported(
44 @pytest.mark.requires_backend_interface(interface=DHBackend)
46 @pytest.mark.parametrize(
85 @pytest.mark.parametrize(
125 @pytest.mark.parametrize(
172 with pytest.raises(TypeError):
176 with pytest.raises(ValueError):
[all …]
Dtest_scrypt.py10 import pytest
32 pytest.skip("Test exceeds Scrypt memory limit. "
37 with pytest.raises(pytest.skip.Exception):
43 @pytest.mark.requires_backend_interface(interface=ScryptBackend)
45 @pytest.mark.parametrize("params", vectors)
68 with pytest.raises(UnsupportedAlgorithm):
79 with pytest.raises(TypeError):
94 with pytest.raises(MemoryError):
108 with pytest.raises(TypeError):
124 @pytest.mark.parametrize("params", vectors)
[all …]
/external/python/cryptography/tests/x509/
Dtest_x509_crlbuilder.py9 import pytest
30 with pytest.raises(TypeError):
37 with pytest.raises(ValueError):
42 @pytest.mark.requires_backend_interface(interface=RSABackend)
43 @pytest.mark.requires_backend_interface(interface=X509Backend)
62 with pytest.raises(TypeError):
67 with pytest.raises(ValueError):
74 with pytest.raises(ValueError):
77 @pytest.mark.requires_backend_interface(interface=RSABackend)
78 @pytest.mark.requires_backend_interface(interface=X509Backend)
[all …]
Dtest_ocsp.py11 import pytest
77 with pytest.raises(ValueError):
108 with pytest.raises(NotImplementedError):
119 with pytest.raises(UnsupportedAlgorithm):
136 with pytest.raises(ValueError):
138 with pytest.raises(ValueError):
147 with pytest.raises(ValueError):
152 with pytest.raises(ValueError):
158 with pytest.raises(ValueError):
164 with pytest.raises(ValueError):
[all …]
Dtest_x509_revokedcertbuilder.py9 import pytest
19 with pytest.raises(TypeError):
23 with pytest.raises(ValueError):
27 with pytest.raises(ValueError):
30 @pytest.mark.requires_backend_interface(interface=X509Backend)
42 @pytest.mark.requires_backend_interface(interface=X509Backend)
55 with pytest.raises(ValueError):
60 with pytest.raises(ValueError):
63 @pytest.mark.requires_backend_interface(interface=X509Backend)
80 with pytest.raises(TypeError):
[all …]
/external/python/pybind11/tests/
Dtest_exceptions.py4 import pytest
11 with pytest.raises(RuntimeError) as excinfo:
17 with pytest.raises(RuntimeError) as excinfo:
21 with pytest.raises(ValueError) as excinfo:
27 with pytest.raises(RuntimeError) as excinfo:
31 with pytest.raises(ValueError) as excinfo:
35 with pytest.raises(ValueError) as excinfo:
39 with pytest.raises(TypeError) as excinfo:
43 with pytest.raises(StopIteration) as excinfo:
55 if hasattr(pytest, unraisable): # Python >= 3.8 and pytest >= 6
[all …]
/external/python/dateutil/dateutil/test/
Dtest_isoparser.py10 import pytest
49 @pytest.mark.parametrize('dt', tuple(DATES))
56 @pytest.mark.parametrize('dt', tuple(DATES))
65 @pytest.mark.parametrize('dt', tuple(DATES))
66 @pytest.mark.parametrize('fmt', YMD_FMTS)
95 @pytest.mark.parametrize('dt', tuple(DATETIMES))
96 @pytest.mark.parametrize('date_fmt', YMD_FMTS)
97 @pytest.mark.parametrize('tzoffset', TZOFFSETS)
102 @pytest.mark.parametrize('dt', tuple(DATETIMES))
103 @pytest.mark.parametrize('date_fmt', YMD_FMTS)
[all …]
Dtest_internals.py13 import pytest
23 # @pytest.mark.smoke
52 @pytest.mark.skipif(IS_PY32, reason='pytest.warns not supported on Python 3.2')
57 with pytest.warns(DeprecationWarning):
60 with pytest.warns(DeprecationWarning):
63 with pytest.warns(DeprecationWarning):
67 @pytest.mark.skipif(IS_PY32, reason='pytest.warns not supported on Python 3.2')
72 with pytest.warns(None) as recorder:
76 with pytest.warns(None) as recorder:
81 with pytest.warns(None) as recorder:
[all …]
/external/python/cryptography/tests/wycheproof/
Dtest_aes.py9 import pytest
22 @pytest.mark.requires_backend_interface(interface=CipherBackend)
23 @pytest.mark.wycheproof_tests("aes_cbc_pkcs5_test.json")
45 with pytest.raises(ValueError):
49 @pytest.mark.requires_backend_interface(interface=CipherBackend)
50 @pytest.mark.wycheproof_tests("aes_gcm_test.json")
74 with pytest.raises(ValueError):
84 with pytest.raises(InvalidTag):
88 @pytest.mark.requires_backend_interface(interface=CipherBackend)
89 @pytest.mark.wycheproof_tests("aes_gcm_test.json")
[all …]
/external/python/cryptography/tests/
Dtest_fernet.py16 import pytest
34 return pytest.mark.parametrize(keys, [
45 @pytest.mark.requires_backend_interface(interface=CipherBackend)
46 @pytest.mark.requires_backend_interface(interface=HMACBackend)
47 @pytest.mark.supported(
82 with pytest.raises(InvalidToken):
87 with pytest.raises(InvalidToken):
92 with pytest.raises(InvalidToken):
97 with pytest.raises(InvalidToken):
102 with pytest.raises(TypeError):
[all …]

12345678910>>...17