Skip to content

Commit

Permalink
Add test for empty repj channel extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
terrorfisch committed Jun 18, 2018
1 parent 37be7fd commit 8c1e3e2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/hardware/program_tests.py
Expand Up @@ -403,6 +403,19 @@ def test_init(self):
with self.assertRaises(KeyError):
mcp['C']

def test_empty_repj(self):
empty_block = InstructionBlock()

root_block = InstructionBlock()
root_block.add_instruction_repj(1, empty_block)

with self.assertRaisesRegex(ValueError, 'no defined channels'):
MultiChannelProgram(root_block)

empty_block.add_instruction_exec(DummyWaveform(duration=1, defined_channels={'A', 'B'}))
MultiChannelProgram(root_block)


def test_via_repr(self):
root_loopA = self.get_mcp('A')
root_loopB = self.get_mcp('B')
Expand Down

0 comments on commit 8c1e3e2

Please sign in to comment.