Skip to content

Commit

Permalink
fixed untrapped error in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lbovet committed Sep 11, 2021
1 parent 17c414d commit 23b3e88
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 40 deletions.
7 changes: 1 addition & 6 deletions tests/samples/if.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,10 @@ b: 2
!if false:
e: 5
f: 6
!if true:
g:
- ? !if true
: - 7

---
# output
a: 1
b: 2
c: 3
d: 4
g:
- 7
33 changes: 0 additions & 33 deletions tests/samples/overlay.yml

This file was deleted.

9 changes: 8 additions & 1 deletion tests/test_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,12 @@ def simple_name(filename):
@pytest.mark.parametrize("filename", files)
def test_sample(filename):
with open(filename) as file_handle:
(input, output) = process_all(file_handle, filename)
(input, output) = process_all(file_handle, filename, FailingErrorHandler())
assert_like(input, output)

class FailingErrorHandler(list):
def __init__(self):
self.nodes = set()

def append(self, error):
raise error

0 comments on commit 23b3e88

Please sign in to comment.