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())
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())
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)
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)