mirror of
https://github.com/borgbackup/borg.git
synced 2025-03-10 06:03:38 +00:00
tests: avoid long ids in pytest output
sometimes the automatically computed IDs are just too long, so rather give IDs directly or avoid them otherwise.
This commit is contained in:
parent
f73eb5c6c2
commit
81588989fe
4 changed files with 7 additions and 5 deletions
|
@ -245,7 +245,8 @@ IK = sorted(list(ITEM_KEYS))
|
|||
{b'path': b'/a/b/c'}, # small (different msgpack mapping type!)
|
||||
OrderedDict((k, b'') for k in IK), # as big (key count) as it gets
|
||||
OrderedDict((k, b'x' * 1000) for k in IK), # as big (key count and volume) as it gets
|
||||
]])
|
||||
]],
|
||||
ids=["minimal", "empty-values", "long-values"])
|
||||
def test_valid_msgpacked_items(packed, item_keys_serialized):
|
||||
assert valid_msgpacked_dict(packed, item_keys_serialized)
|
||||
|
||||
|
|
|
@ -4789,6 +4789,7 @@ def test_help_formatting(command, parser):
|
|||
assert parser.epilog.rst
|
||||
|
||||
|
||||
@pytest.mark.parametrize('topic, helptext', list(Archiver.helptext.items()))
|
||||
def test_help_formatting_helptexts(topic, helptext):
|
||||
@pytest.mark.parametrize('topic', list(Archiver.helptext.keys()))
|
||||
def test_help_formatting_helptexts(topic):
|
||||
helptext = Archiver.helptext[topic]
|
||||
assert str(rst_to_terminal(helptext))
|
||||
|
|
|
@ -117,7 +117,7 @@ class TestCacheSynchronizer:
|
|||
(True, 'Unexpected object: true'),
|
||||
(False, 'Unexpected object: false'),
|
||||
(None, 'Unexpected object: nil'),
|
||||
))
|
||||
), ids=["map", "bytes", "int", "double", "true", "false", "none"])
|
||||
@pytest.mark.parametrize('structure', (
|
||||
lambda elem: {'chunks': elem},
|
||||
lambda elem: {'chunks': [elem]},
|
||||
|
|
|
@ -384,7 +384,7 @@ class TestTAM:
|
|||
(bytes(64), {}),
|
||||
(None, bytes(64)),
|
||||
(bytes(64), None),
|
||||
))
|
||||
), ids=["ed-b64", "b64-ed", "n-b64", "b64-n"])
|
||||
def test_wrong_types(self, key, hmac, salt):
|
||||
data = {
|
||||
'tam': {
|
||||
|
|
Loading…
Add table
Reference in a new issue