我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用traitlets.Int()。
def test_special_types(): obj, sig = dbus_prepare(Color.NewFromHtml('black')) assert obj == '#000000' assert sig == 's' obj, sig = dbus_prepare(Int(5)) assert isinstance(obj, dict) assert sig == 'a{sv}' for value in obj.values(): assert isinstance(value, GLib.Variant) obj, sig = dbus_prepare(EnumTest) assert isinstance(obj, tuple) assert sig == '(sss)'