Ejemplo n.º 1
0
    def test_dump(self):
        props = OrderedDict()
        props['a'] = 1
        props['b'] = '''2
'''
        props['c'] = ' 3 : ='
        out = Compatibility.StringIO()
        Properties.dump(props, out)
        self.assertEquals('a=1\nb=2\\\n\nc=\\ 3\\ \\:\\ \\=\n', out.getvalue())
Ejemplo n.º 2
0
  def test_dump(self):
    props = OrderedDict()
    props['a'] = 1
    props['b'] = '''2
'''
    props['c'] =' 3 : ='
    out = Compatibility.StringIO()
    Properties.dump(props, out)
    self.assertEquals('a=1\nb=2\\\n\nc=\\ 3\\ \\:\\ \\=\n', out.getvalue())
Ejemplo n.º 3
0
 def dump(self, path):
   """Saves the pushdb as a properties file to the given path."""
   with open(path, 'w') as props:
     Properties.dump(self._props, props)
Ejemplo n.º 4
0
 def dump(self, path):
     """Saves the pushdb as a properties file to the given path."""
     with open(path, 'w') as props:
         Properties.dump(self._props, props)