コード例 #1
0
ファイル: test_util.py プロジェクト: JacekPliszka/spyne
    def test_deser(self):
        class C(ComplexModel):
            a = Unicode
            b = Decimal

        ret = get_object_as_yaml(C(a='burak', b=D(30)), C)
        assert ret == b"""C:
コード例 #2
0
    def test_deser(self):
        class C(ComplexModel):
            a = Unicode
            b = Decimal

        ret = get_object_as_yaml(C(a='burak', b=D(30)), C)
        assert ret == """C:
コード例 #3
0
ファイル: config.py プロジェクト: cemrecan/neurons
 def do_write_config(self):
     open(self.config_file, 'wb').write(get_object_as_yaml(self,
                                           self.__class__, polymorphic=True))
コード例 #4
0
ファイル: config.py プロジェクト: drlatech/neurons
 def write_config(self):
     open(self.config_file, 'wb').write(
         get_object_as_yaml(self, self.__class__, polymorphic=True))