aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_package.py
diff options
context:
space:
mode:
authorGravatar Jon Bernard <jbernard@tuxion.com> 2015-12-28 14:36:13 -0500
committerGravatar Jon Bernard <jbernard@tuxion.com> 2015-12-28 14:36:13 -0500
commitf383fba3c07b573f758dfe1d91e144d547848c1a (patch)
tree900ae5f535eefceacca7a968071bee231f5fdcb9 /tests/test_package.py
parent5e25760d14bc6719810d9129c3226514e545f042 (diff)
downloaddotfiles-f383fba3c07b573f758dfe1d91e144d547848c1a.tar.gz
dotfiles-f383fba3c07b573f758dfe1d91e144d547848c1a.tar.bz2
dotfiles-f383fba3c07b573f758dfe1d91e144d547848c1a.zip
Add package sync test
Diffstat (limited to 'tests/test_package.py')
-rw-r--r--tests/test_package.py21
1 files changed, 21 insertions, 0 deletions
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)