From f383fba3c07b573f758dfe1d91e144d547848c1a Mon Sep 17 00:00:00 2001 From: Jon Bernard Date: Mon, 28 Dec 2015 14:36:13 -0500 Subject: Add package sync test --- tests/test_package.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/test_package.py (limited to 'tests/test_package.py') diff --git a/tests/test_package.py b/tests/test_package.py new file mode 100644 index 0000000..ddc5787 --- /dev/null +++ b/tests/test_package.py @@ -0,0 +1,21 @@ +from dotfiles.core import Dotfiles + + +def test_package_sync(tmpdir): + """Test syncing a package.""" + + repository = tmpdir.ensure('Dotfiles', dir=1) + dotfile = repository.ensure('config/awesome/testfile') + + Dotfiles(homedir=str(tmpdir), + path=str(repository), + prefix='', + ignore=[], + externals={}, + packages=['config'], + dry_run=False, + quiet=True).sync() + + assert tmpdir.join('.config').check(dir=1) + assert tmpdir.join('.config/awesome').check(link=1) + assert tmpdir.join('.config/awesome').samefile(dotfile.dirname) -- cgit v1.2.3