1 From a355238190a4da2b6ccd3403fea391ceef71ca7b Mon Sep 17 00:00:00 2001
2 From: Anderson Bravalheri <andersonbravalheri@gmail.com>
3 Date: Fri, 28 Oct 2022 10:35:13 +0100
4 Subject: [PATCH] Replace 'return' with 'assert' in incorrect tests
7 tests/test_examples.py | 2 +-
8 tests/test_pre_compile.py | 2 +-
9 2 files changed, 2 insertions(+), 2 deletions(-)
11 diff --git a/tests/test_examples.py b/tests/test_examples.py
12 index e3848e6..b082786 100644
13 --- a/tests/test_examples.py
14 +++ b/tests/test_examples.py
16 def test_examples_api(example):
17 toml_equivalent = toml_.loads((EXAMPLES / example).read_text())
18 validator = api.Validator()
19 - return validator(toml_equivalent) is not None
20 + assert validator(toml_equivalent) is not None
23 @pytest.mark.parametrize("example", examples())
24 diff --git a/tests/test_pre_compile.py b/tests/test_pre_compile.py
25 index fad61f6..c7397a2 100644
26 --- a/tests/test_pre_compile.py
27 +++ b/tests/test_pre_compile.py
28 @@ -140,7 +140,7 @@ def _validate(vendored_path, toml_equivalent):
29 def test_examples_api(tmp_path, pre_compiled_validate, example, pre_compiled):
30 toml_equivalent = toml_.loads((EXAMPLES / example).read_text())
31 pre_compiled_path = pre_compiled(Path(tmp_path))
32 - return pre_compiled_validate(pre_compiled_path, toml_equivalent) is not None
33 + assert pre_compiled_validate(pre_compiled_path, toml_equivalent) is not None
36 @pytest.mark.parametrize("example", invalid_examples())