Skip to content

Commit

Permalink
Add some more failing cases to unit tests for the
Browse files Browse the repository at this point in the history
brackets checking.  I had simply carried over what was there
before, but it really seemed insufficient...
  • Loading branch information
chisholm committed Sep 15, 2020
1 parent d5472ca commit 0c298c8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion stix2patterns/test/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,14 @@ def test_brackets_check(value):
assert brackets_check(value)


def test_brackets_check_fail():
@pytest.mark.parametrize(
"value", [
None,
"file:size = 1280",
"(file:size = 1280)",
" ( file:size = 1280 ) ",
" (( (( file:size = 1280 ) )) ) ",
]
)
def test_brackets_check_fail(value):
assert not brackets_check(None)

0 comments on commit 0c298c8

Please sign in to comment.