Skip to content

Commit

Permalink
test: add test to ensure singlechannel is instantiated properly
Browse files Browse the repository at this point in the history
  • Loading branch information
nulinspiratie committed Apr 12, 2024
1 parent da08671 commit a2110b4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/components/channels/test_single_channel.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest
import json
from copy import deepcopy

from quam.components import *
Expand Down Expand Up @@ -136,3 +137,16 @@ def test_single_channel_set_dc_offset(mocker):
set_dc_offset.assert_called_once_with(
element="channel", element_input="single", offset=0.5
)


def test_instantiate_single_channel():
from quam.core.quam_instantiation import instantiate_quam_class

channel = SingleChannel(opx_output=("con1", 1))
d = channel.to_dict()

d_json = json.dumps(d)

d_loaded = json.loads(d_json)

instantiate_quam_class(SingleChannel, d_loaded)

0 comments on commit a2110b4

Please sign in to comment.