示例#1
0
    def test_deprecated_key(self):
        """Test deprecation warning."""
        style = stylesheet.QiskitPulseStyle()
        style._deprecated_keys = {'deprecated_key': 'new_key'}

        with self.assertWarns(DeprecationWarning):
            dep_dict = {'deprecated_key': 'value_1'}
            style.update(dep_dict)

        self.assertEqual(style['new_key'], 'value_1')
示例#2
0
 def setUp(self) -> None:
     self.style = stylesheet.QiskitPulseStyle()
 def setUp(self) -> None:
     super().setUp()
     self.style = stylesheet.QiskitPulseStyle()