Beispiel #1
0
def test_config_serialization():
    config = Config([
        DotFile(name='.vimrc', target='~/_vimrc', action='symlink'),
        DotFile(name='.bashrc', action='include'),
        DotFile(name='rc.conf', target='.config/openbox/rc.conf', action='copy')
    ])
    expected_string = """\
dotfiles:
- name: .vimrc
  target: ~/_vimrc
  action: symlink
- name: .bashrc
  target: ~/.bashrc
  action: include
- name: rc.conf
  target: .config/openbox/rc.conf
  action: copy
"""
    eq_(expected_string, config.to_yaml())