aboutsummaryrefslogtreecommitdiff
path: root/tests/test_sync.py
diff options
context:
space:
mode:
authorJon Bernard <jbernard@tuxion.com>2015-12-28 14:28:49 -0500
committerJon Bernard <jbernard@tuxion.com>2015-12-28 14:28:49 -0500
commit5e25760d14bc6719810d9129c3226514e545f042 (patch)
treef6bf8f9209d82136ab9e475d061314ae13a15c10 /tests/test_sync.py
parentd5c33543395ad07e9581a3505c36478152f7225b (diff)
downloaddotfiles-5e25760d14bc6719810d9129c3226514e545f042.zip
Create new location for sync tests
I'm going to migrate away from unittest capability in favor of pytest and its use of the py.path filesystem abstraction. It's much cleaner and easier to work with.
Diffstat (limited to 'tests/test_sync.py')
-rw-r--r--tests/test_sync.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/test_sync.py b/tests/test_sync.py
new file mode 100644
index 0000000..e8a51cc
--- /dev/null
+++ b/tests/test_sync.py
@@ -0,0 +1,19 @@
+from dotfiles.core import Dotfiles
+
+
+def test_sync(tmpdir):
+ """Basic sync operation."""
+
+ dotfile = tmpdir.ensure('Dotfiles/foo')
+ symlink = tmpdir.join('.foo')
+
+ Dotfiles(homedir=str(tmpdir),
+ path=str(dotfile.dirname),
+ prefix='',
+ ignore=[],
+ externals={},
+ packages=[],
+ dry_run=False).sync()
+
+ assert symlink.check(link=1)
+ assert symlink.samefile(dotfile)