Skip to content

Commit a11ef1f

Browse files
committed
Update utility functions
1 parent 313da94 commit a11ef1f

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

pygdtf/utils/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ def get_virtual_channels(
172172
"name": channel_function.name,
173173
"attribute": channel_function.attribute.str_link,
174174
"real_fade": channel_function.real_fade,
175+
"physical_to": channel_function.physical_to,
176+
"physical_from": channel_function.physical_from,
175177
"channel_sets": [
176178
channel_set.name
177179
for channel_set in channel_function.channel_sets
@@ -287,6 +289,8 @@ def get_dmx_channels(
287289
"name": channel_function.name,
288290
"attribute": channel_function.attribute.str_link,
289291
"real_fade": channel_function.real_fade,
292+
"physical_to": channel_function.physical_to,
293+
"physical_from": channel_function.physical_from,
290294
"channel_sets": [
291295
channel_set.name
292296
for channel_set in channel_function.channel_sets
@@ -315,6 +319,8 @@ def get_dmx_channels(
315319
"name": channel_function.name,
316320
"attribute": channel_function.attribute.str_link,
317321
"real_fade": channel_function.real_fade,
322+
"physical_to": channel_function.physical_to,
323+
"physical_from": channel_function.physical_from,
318324
"channel_sets": [
319325
channel_set.name
320326
for channel_set in channel_function.channel_sets

tests/test_utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,6 @@ def test_get_geometries(pygdtf_module):
5454

5555
def test_calculate_complexity_total(pygdtf_module, gdtf_fixture):
5656
"""Test calculation"""
57-
total_complexity = pygdtf_module.utils.calculate_complexity(gdtf_fixture)["total"]
58-
assert 89 == total_complexity
57+
complexity = pygdtf_module.utils.calculate_complexity(gdtf_fixture)
58+
print(complexity)
59+
assert 119 == complexity["total"]

0 commit comments

Comments
 (0)