Skip to content

Commit e0184cc

Browse files
committed
reformat
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 618a292 commit e0184cc

File tree

2 files changed

+24
-12
lines changed

2 files changed

+24
-12
lines changed

tests/test_output_json.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,13 @@ def test_unsupported_schema_raises(self, sv: SchemaVersion) -> None:
5353
with self.assertRaises(FormatNotSupportedException):
5454
outputter.output_as_string()
5555

56-
@named_data(*((f'{n}-{sv.to_version()}', gb, sv)
57-
for n, gb in all_get_bom_funct_valid
58-
for sv in SchemaVersion
59-
if sv not in UNSUPPORTED_SV and is_valid_for_schema_version(gb, sv)))
56+
@named_data(*(
57+
(f'{n}-{sv.to_version()}', gb, sv)
58+
for n, gb in all_get_bom_funct_valid
59+
for sv in SchemaVersion
60+
if sv not in UNSUPPORTED_SV
61+
and is_valid_for_schema_version(gb, sv)
62+
))
6063
@unpack
6164
@patch('cyclonedx.model.ThisTool._version', 'TESTING')
6265
def test_valid(self, get_bom: Callable[[], Bom], sv: SchemaVersion, *_: Any, **__: Any) -> None:
@@ -72,10 +75,13 @@ def test_valid(self, get_bom: Callable[[], Bom], sv: SchemaVersion, *_: Any, **_
7275
self.assertIsNone(errors, json)
7376
self.assertEqualSnapshot(json, snapshot_name)
7477

75-
@named_data(*((f'{n}-{sv.to_version()}', gb, sv)
76-
for n, gb in all_get_bom_funct_invalid
77-
for sv in SchemaVersion
78-
if sv not in UNSUPPORTED_SV))
78+
@named_data(*(
79+
(f'{n}-{sv.to_version()}', gb, sv)
80+
for n, gb in all_get_bom_funct_invalid
81+
for sv in SchemaVersion
82+
if sv not in UNSUPPORTED_SV
83+
and is_valid_for_schema_version(gb, sv)
84+
))
7985
@unpack
8086
def test_invalid(self, get_bom: Callable[[], Bom], sv: SchemaVersion) -> None:
8187
with self.assertRaises(CycloneDxException) as error:

tests/test_output_xml.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,12 @@
4141
@ddt
4242
class TestOutputXml(TestCase, SnapshotMixin):
4343

44-
@named_data(*((f'{n}-{sv.to_version()}', gb, sv)
45-
for n, gb in all_get_bom_funct_valid
46-
for sv in SchemaVersion if is_valid_for_schema_version(gb, sv)))
44+
@named_data(*(
45+
(f'{n}-{sv.to_version()}', gb, sv)
46+
for n, gb in all_get_bom_funct_valid
47+
for sv in SchemaVersion
48+
if is_valid_for_schema_version(gb, sv)
49+
))
4750
@unpack
4851
@patch('cyclonedx.model.ThisTool._version', 'TESTING')
4952
def test_valid(self, get_bom: Callable[[], Bom], sv: SchemaVersion, *_: Any, **__: Any) -> None:
@@ -62,7 +65,10 @@ def test_valid(self, get_bom: Callable[[], Bom], sv: SchemaVersion, *_: Any, **_
6265
self.assertEqualSnapshot(xml, snapshot_name)
6366

6467
@named_data(*(
65-
(f'{n}-{sv.to_version()}', gb, sv) for n, gb in all_get_bom_funct_invalid for sv in SchemaVersion
68+
(f'{n}-{sv.to_version()}', gb, sv)
69+
for n, gb in all_get_bom_funct_invalid
70+
for sv in SchemaVersion
71+
if is_valid_for_schema_version(gb, sv)
6672
))
6773
@unpack
6874
def test_invalid(self, get_bom: Callable[[], Bom], sv: SchemaVersion) -> None:

0 commit comments

Comments
 (0)