8000 fix additional lint errors in tests · spdx/tools-python@ee95e60 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit ee95e60

Browse files
lumjjbarmintaenzertng
authored andcommitted
fix additional lint errors in tests
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
1 parent 3f1c62f commit ee95e60

File tree

2 files changed

+4
-4
lines changed

tests/spdx/parser/all_formats/test_parse_from_file.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def test_parse_from_file_with_2_3_example(self, parser, format_name, extension):
3636
doc = parser.parse_from_file(
3737
os.path.join(os.path.dirname(__file__), f"../../data/SPDX{format_name}Example-v2.3.spdx{extension}")
3838
)
39-
assert type(doc) == Document
39+
assert isinstance(doc, Document)
4040
assert len(doc.annotations) == 5
4141
assert len(doc.files) == 5
4242
assert len(doc.packages) == 4
@@ -48,7 +48,7 @@ def test_parse_json_with_2_2_example(self, parser, format_name, extension):
4848
doc = parser.parse_from_file(
4949
os.path.join(os.path.dirname(__file__), f"../../data/SPDX{format_name}Example-v2.2.spdx{extension}")
5050
)
51-
assert type(doc) == Document
51+
assert isinstance(doc, Document)
5252
assert len(doc.annotations) == 5
5353
assert len(doc.files) == 4
5454
assert len(doc.packages) == 4

tests/spdx/parser/jsonlikedict/test_dict_parsing_functions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def test_invalid_json_str_to_enum(invalid_json_str, expected_message):
3434
def test_parse_field_or_no_assertion(input_str, expected_type):
3535
resulting_value = parse_field_or_no_assertion(input_str, lambda x: x)
3636

37-
assert type(resulting_value) == expected_type
37+
assert isinstance(resulting_value, expected_type)
3838

3939

4040
@pytest.mark.parametrize(
@@ -43,4 +43,4 @@ def test_parse_field_or_no_assertion(input_str, expected_type):
4343
def test_parse_field_or_no_assertion_or_none(input_str, expected_type):
4444
resulting_value = parse_field_or_no_assertion_or_none(input_str, lambda x: x)
4545

46-
assert type(resulting_value) == expected_type
46+
assert isinstance(resulting_value, expected_type)

0 commit comments

Comments
 (0)
0