@@ -41,7 +41,7 @@ def test_run(sift_client: SiftClient):
4141 )
4242 yield run
4343 # Cleanup
44- sift_client .runs .archive (run = run . id_ )
44+ sift_client .runs .archive (run = run )
4545
4646
4747class TestIngestionAPIAsync :
@@ -56,9 +56,7 @@ async def test_create_basic_config(self, sift_client, test_run):
5656 flow = Flow (
5757 name = "test-basic-flow" ,
5858 channels = [
59- ChannelConfig (
60- name = "test-channel" , data_type = ChannelDataType .DOUBLE
61- ),
59+ ChannelConfig (name = "test-channel" , data_type = ChannelDataType .DOUBLE ),
6260 ],
6361 )
6462
@@ -77,18 +75,14 @@ async def test_create_config_with_multiple_flows(self, sift_client, test_run):
7775 regular_flow = Flow (
7876 name = "test-regular-flow" ,
7977 channels = [
80- ChannelConfig (
81- name = "regular-channel" , data_type = ChannelDataType .DOUBLE
82- ),
78+ ChannelConfig (name = "regular-channel" , data_type = ChannelDataType .DOUBLE ),
8379 ],
8480 )
8581
8682 highspeed_flow = Flow (
8783 name = "test-highspeed-flow" ,
8884 channels = [
89- ChannelConfig (
90- name = "highspeed-channel" , data_type = ChannelDataType .DOUBLE
91- ),
85+ ChannelConfig (name = "highspeed-channel" , data_type = ChannelDataType .DOUBLE ),
9286 ],
9387 )
9488
@@ -123,9 +117,7 @@ async def test_create_config_with_enum_channel(self, sift_client, test_run):
123117 assert config_id is not None
124118
125119 @pytest .mark .asyncio
126- async def test_create_config_with_bit_field_channel (
127- self , sift_client , test_run
128- ):
120+ async def test_create_config_with_bit_field_channel (self , sift_client , test_run ):
129121 """Test creating an ingestion configuration with bit field channel."""
130122 flow = Flow (
131123 name = "test-bitfield-flow" ,
@@ -134,12 +126,8 @@ async def test_create_config_with_bit_field_channel(
134126 name = "test-bit-field-channel" ,
135127 data_type = ChannelDataType .BIT_FIELD ,
136128 bit_field_elements = [
137- ChannelBitFieldElement (
138- name = "voltage" , index = 0 , bit_count = 4
139- ),
140- ChannelBitFieldElement (
141- name = "current" , index = 4 , bit_count = 2
142- ),
129+ ChannelBitFieldElement (name = "voltage" , index = 0 , bit_count = 4 ),
130+ ChannelBitFieldElement (name = "current" , index = 4 , bit_count = 2 ),
143131 ChannelBitFieldElement (name = "status" , index = 6 , bit_count = 2 ),
144132 ],
145133 ),
@@ -160,9 +148,7 @@ async def test_flow_sealed_after_config_creation(self, sift_client, test_run):
160148 flow = Flow (
161149 name = "test-sealed-flow" ,
162150 channels = [
163- ChannelConfig (
164- name = "test-channel" , data_type = ChannelDataType .DOUBLE
165- ),
151+ ChannelConfig (name = "test-channel" , data_type = ChannelDataType .DOUBLE ),
166152 ],
167153 )
168154
@@ -173,9 +159,7 @@ async def test_flow_sealed_after_config_creation(self, sift_client, test_run):
173159 )
174160
175161 # Try to add a channel after config creation
176- with pytest .raises (
177- ValueError , match = "Cannot add a channel to a flow after creation"
178- ):
162+ with pytest .raises (ValueError , match = "Cannot add a channel to a flow after creation" ):
179163 flow .add_channel (
180164 ChannelConfig (name = "new-channel" , data_type = ChannelDataType .DOUBLE )
181165 )
@@ -189,9 +173,7 @@ async def test_ingest_double_data(self, sift_client, test_run):
189173 flow = Flow (
190174 name = "test-double-flow" ,
191175 channels = [
192- ChannelConfig (
193- name = "double-channel" , data_type = ChannelDataType .DOUBLE
194- ),
176+ ChannelConfig (name = "double-channel" , data_type = ChannelDataType .DOUBLE ),
195177 ],
196178 )
197179
@@ -251,12 +233,8 @@ async def test_ingest_bit_field_data_as_dict(self, sift_client, test_run):
251233 name = "bitfield-channel" ,
252234 data_type = ChannelDataType .BIT_FIELD ,
253235 bit_field_elements = [
254- ChannelBitFieldElement (
255- name = "voltage" , index = 0 , bit_count = 4
256- ),
257- ChannelBitFieldElement (
258- name = "current" , index = 4 , bit_count = 2
259- ),
236+ ChannelBitFieldElement (name = "voltage" , index = 0 , bit_count = 4 ),
237+ ChannelBitFieldElement (name = "current" , index = 4 , bit_count = 2 ),
260238 ChannelBitFieldElement (name = "led" , index = 6 , bit_count = 1 ),
261239 ChannelBitFieldElement (name = "heater" , index = 7 , bit_count = 1 ),
262240 ],
@@ -367,9 +345,7 @@ async def test_ingest_highspeed_data(self, sift_client, test_run):
367345 flow = Flow (
368346 name = "test-highspeed-data-flow" ,
369347 channels = [
370- ChannelConfig (
371- name = "highspeed-channel" , data_type = ChannelDataType .DOUBLE
372- ),
348+ ChannelConfig (name = "highspeed-channel" , data_type = ChannelDataType .DOUBLE ),
373349 ],
374350 )
375351
@@ -429,9 +405,7 @@ async def test_ingest_missing_channel_raises_error(self, sift_client, test_run):
429405 )
430406
431407 @pytest .mark .asyncio
432- async def test_ingest_invalid_enum_value_raises_error (
433- self , sift_client , test_run
434- ):
408+ async def test_ingest_invalid_enum_value_raises_error (self , sift_client , test_run ):
435409 """Test that ingesting an invalid enum value raises an error."""
436410 flow = Flow (
437411 name = "test-enum-validation-flow" ,
@@ -471,9 +445,7 @@ async def test_resume_ingestion_after_wait(self, sift_client, test_run):
471445 flow = Flow (
472446 name = "test-resume-flow" ,
473447 channels = [
474- ChannelConfig (
475- name = "test-channel" , data_type = ChannelDataType .DOUBLE
476- ),
448+ ChannelConfig (name = "test-channel" , data_type = ChannelDataType .DOUBLE ),
477449 ],
478450 )
479451
0 commit comments