a101d1f604a3ad6de242989f7a4887b78ab012a1
Marco Ricci Move typing classes into se...

Marco Ricci authored 4 months ago

tests/test_typing.py                   1) # SPDX-FileCopyrightText: 2024 Marco Ricci <m@the13thletter.info>
tests/test_typing.py                   2) #
tests/test_typing.py                   3) # SPDX-License-Identifier: MIT
tests/test_typing.py                   4) 
tests/test_typing.py                   5) from __future__ import annotations
tests/test_typing.py                   6) 
Marco Ricci Fix style issues with ruff...

Marco Ricci authored 3 months ago

tests/test_derivepassphrase_typing.py  7) import pytest
Marco Ricci Support Python 3.10 and PyP...

Marco Ricci authored 3 months ago

tests/test_derivepassphrase_typing.py  8) from typing_extensions import Any
Marco Ricci Move typing classes into se...

Marco Ricci authored 4 months ago

tests/test_typing.py                   9) 
Marco Ricci Rename and regroup all test...

Marco Ricci authored 4 months ago

tests/test_derivepassphrase_typing.py 10) import derivepassphrase.types
Marco Ricci Fix style issues with ruff...

Marco Ricci authored 3 months ago

tests/test_derivepassphrase_typing.py 11) 
Marco Ricci Move typing classes into se...

Marco Ricci authored 4 months ago

tests/test_typing.py                  12) 
tests/test_typing.py                  13) @pytest.mark.parametrize(['obj', 'comment'], [
tests/test_typing.py                  14)     (None, 'not a dict'),
tests/test_typing.py                  15)     ({}, 'missing required keys'),
tests/test_typing.py                  16)     ({'global': None, 'services': {}}, 'bad config value: global'),
tests/test_typing.py                  17)     ({'global': {'key': 123}, 'services': {}},
tests/test_typing.py                  18)      'bad config value: global.key'),
tests/test_typing.py                  19)     ({'global': {'phrase': 'abc', 'key': '...'}, 'services': {}},
tests/test_typing.py                  20)      'incompatible config values: global.key and global.phrase'),
tests/test_typing.py                  21)     ({'services': None}, 'bad config value: services'),
tests/test_typing.py                  22)     ({'services': {2: {}}}, 'bad config value: services."2"'),
tests/test_typing.py                  23)     ({'services': {'2': 2}}, 'bad config value: services."2"'),
tests/test_typing.py                  24)     ({'services': {'sv': {'notes': False}}},
tests/test_typing.py                  25)      'bad config value: services.sv.notes'),
tests/test_typing.py                  26)     ({'services': {'sv': {'notes': 'blah blah blah'}}}, ''),
tests/test_typing.py                  27)     ({'services': {'sv': {'length': '200'}}},
tests/test_typing.py                  28)      'bad config value: services.sv.length'),
tests/test_typing.py                  29)     ({'services': {'sv': {'length': 0.5}}},
tests/test_typing.py                  30)      'bad config value: services.sv.length'),
tests/test_typing.py                  31)     ({'services': {'sv': {'length': -10}}},
tests/test_typing.py                  32)      'bad config value: services.sv.length'),
tests/test_typing.py                  33)     ({'services': {'sv': {'upper': -10}}},
tests/test_typing.py                  34)      'bad config value: services.sv.upper'),
tests/test_typing.py                  35)     ({'global': {'phrase': 'my secret phrase'},
tests/test_typing.py                  36)       'services': {'sv': {'length': 10}}},
tests/test_typing.py                  37)      ''),
tests/test_typing.py                  38)     ({'services': {'sv': {'length': 10, 'phrase': '...'}}}, ''),
tests/test_typing.py                  39)     ({'services': {'sv': {'length': 10, 'key': '...'}}}, ''),
tests/test_typing.py                  40)     ({'services': {'sv': {'upper': 10, 'key': '...'}}}, ''),
tests/test_typing.py                  41)     ({'services': {'sv': {'phrase': 'abc', 'key': '...'}}},
tests/test_typing.py                  42)      'incompatible config values: services.sv.key and services.sv.phrase'),
tests/test_typing.py                  43)     ({'global': {'phrase': 'abc'},
tests/test_typing.py                  44)       'services': {'sv': {'phrase': 'abc', 'length': 10}}}, ''),
tests/test_typing.py                  45)     ({'global': {'key': '...'},
tests/test_typing.py                  46)       'services': {'sv': {'phrase': 'abc', 'length': 10}}}, ''),
Marco Ricci Rename and regroup all test...

Marco Ricci authored 4 months ago

tests/test_derivepassphrase_typing.py 47)     ({'global': {'key': '...'},
tests/test_derivepassphrase_typing.py 48)       'services': {'sv1': {'phrase': 'abc', 'length': 10, 'upper': 1},
tests/test_derivepassphrase_typing.py 49)                    'sv2': {'length': 10, 'repeat': 1, 'lower': 1}}}, ''),
Marco Ricci Move typing classes into se...

Marco Ricci authored 4 months ago

tests/test_typing.py                  50) ])
tests/test_typing.py                  51) def test_200_is_vault_config(obj: Any, comment: str) -> None:
Marco Ricci Rename and regroup all test...

Marco Ricci authored 4 months ago

tests/test_derivepassphrase_typing.py 52)     is_vault_config = derivepassphrase.types.is_vault_config
tests/test_derivepassphrase_typing.py 53)     assert is_vault_config(obj) == (not comment), (