예제 #1
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 == 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))