Skip to content

Commit fda68db

Browse files
committed
Add new test
1 parent d54e890 commit fda68db

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# -*- coding: utf-8 -*-
2+
3+
# This code is part of Qiskit.
4+
#
5+
# (C) Copyright IBM 2020.
6+
#
7+
# This code is licensed under the Apache License, Version 2.0. You may
8+
# obtain a copy of this license in the LICENSE.txt file in the root directory
9+
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
10+
#
11+
# Any modifications or derivative works of this code must retain this
12+
# copyright notice, and modified files need to carry a notice indicating
13+
# that they have been altered from the originals.
14+
15+
# pylint: disable=invalid-name,unexpected-keyword-arg
16+
17+
"""Unit tests for pulse instructions."""
18+
19+
from qiskit.pulse import Delay, DriveChannel
20+
from qiskit.test import QiskitTestCase
21+
22+
23+
class TestDelayCommand(QiskitTestCase):
24+
"""Delay tests."""
25+
26+
def test_delay(self):
27+
"""Test delay."""
28+
delay = Delay(10, DriveChannel(0), name='test_name')
29+
30+
self.assertEqual(delay.name, "test_name")
31+
self.assertEqual(delay.duration, 10)
32+
self.assertEqual(delay.operands, [10, DriveChannel(0)])

0 commit comments

Comments
 (0)