summaryrefslogtreecommitdiff
path: root/tests/files/fail/test_type_seq.yaml
blob: a5baacd5df62906dd86590f3e0201ab87a95ec95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#
# TODO: All of these failure tests currently raises a strange error that might not be the correct one and might require some redesign of the implementation.
#       pykwalify.errors.NotSequenceError: <NotSequenceError: error code 7: Value: {} is not of a sequence type: Path: '/'>
#

# ---
# name: fail-type-seq-1
# desc: Test the most basic case for seq
# data:
#   {}
# schema:
#   type: seq
#   sequence:
#     - type: str
# errors:
#   - ''
# ---
# name: fail-type-seq-2
# desc: Test that seq in seq works
# data:
#   - {}
#   - {}
# schema:
#   type: seq
#   sequence:
#     - type: seq
#       sequence:
#         - type: bool
# errors:
#   - ''
# ---
# name: fail-type-seq-3
# desc: Test bool inside nested map & seq
# data:
#   - foo:
#       {}
# schema:
#   type: seq
#   sequence:
#     - type: map
#       mapping:
#         foo:
#           type: seq
#           sequence:
#             - type: bool
# errors:
#   - ''