Skip to content

Instantly share code, notes, and snippets.

@tdeboissiere
Created January 27, 2019 02:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tdeboissiere/52f4e08195a32df1cbc85ba425676cc9 to your computer and use it in GitHub Desktop.
Save tdeboissiere/52f4e08195a32df1cbc85ba425676cc9 to your computer and use it in GitHub Desktop.
============================= test session starts ==============================
platform linux -- Python 3.6.4, pytest-3.5.0, py-1.5.3, pluggy-0.6.0
rootdir: /home/tmain/dvc, inifile:
plugins: sugar-0.9.1, remotedata-0.2.0, openfiles-0.2.0, doctestplus-0.1.2, arraydiff-0.2
collected 1 item
tests/test_install.py F [100%]
=================================== FAILURES ===================================
_______________________________ TestInstall.test _______________________________
self = <tests.test_install.TestInstall testMethod=test>
def test(self):
ret = main(['install'])
self.assertEqual(ret, 0)
ret = main(['install'])
self.assertNotEqual(ret, 0)
def hook(name):
return os.path.join('.git', 'hooks', name)
self.assertTrue(os.path.isfile(hook('post-checkout')))
self.assertTrue(os.path.isfile(hook('pre-commit')))
self.dvc.add(self.FOO)
os.unlink(self.FOO)
self.dvc.scm.checkout('branch', create_new=True)
> self.assertTrue(os.path.isfile(self.FOO))
E AssertionError: False is not true
tests/test_install.py:26: AssertionError
----------------------------- Captured stdout call -----------------------------
Adding '.dvc/state' to '.dvc/.gitignore'.
Adding '.dvc/lock' to '.dvc/.gitignore'.
Adding '.dvc/config.local' to '.dvc/.gitignore'.
Adding '.dvc/updater' to '.dvc/.gitignore'.
Adding '.dvc/updater.lock' to '.dvc/.gitignore'.
Adding '.dvc/state-journal' to '.dvc/.gitignore'.
Adding '.dvc/state-wal' to '.dvc/.gitignore'.
Adding '.dvc/cache' to '.dvc/.gitignore'.
You can now commit the changes to git.
+---------------------------------------------------------------------+
| |
| DVC has enabled anonymous aggregate usage analytics. |
| Read the analytics documentation (and how to opt-out) here: |
| https://dvc.org/doc/user-guide/analytics |
| |
+---------------------------------------------------------------------+

What's next?
------------
- Check out the documentation: https://dvc.org/doc
- Get help and share ideas: https://dvc.org/chat
- Star us on GitHub: https://github.com/iterative/dvc
Debug: CREATE TABLE IF NOT EXISTS state (inode INTEGER PRIMARY KEY, mtime TEXT NOT NULL, size TEXT NOT NULL, md5 TEXT NOT NULL, timestamp TEXT NOT NULL)
Debug: CREATE TABLE IF NOT EXISTS state_info (count INTEGER)
Debug: CREATE TABLE IF NOT EXISTS link_state (path TEXT PRIMARY KEY, inode INTEGER NOT NULL, mtime TEXT NOT NULL)
Debug: INSERT OR IGNORE INTO state_info (count) SELECT 0 WHERE NOT EXISTS (SELECT * FROM state_info)
Debug: PRAGMA user_version = 3;
Debug: Skipping copying for '/tmp/dvc-test.30033.yxwz7cwp.e9132f2e-1d64-48f5-95f9-d1c74f71e74d/foo', since it is not a symlink or a hardlink.
Debug: checking if '{'scheme': 'local', 'path': '/tmp/dvc-test.30033.yxwz7cwp.e9132f2e-1d64-48f5-95f9-d1c74f71e74d/foo'}'('{}') has changed.
Debug: checksum for '{'scheme': 'local', 'path': '/tmp/dvc-test.30033.yxwz7cwp.e9132f2e-1d64-48f5-95f9-d1c74f71e74d/foo'}' is missing.
Adding 'foo' to '.gitignore'.
Saving 'foo' to cache '.dvc/cache'.
Debug: Path /tmp/dvc-test.30033.yxwz7cwp.e9132f2e-1d64-48f5-95f9-d1c74f71e74d/foo inode 6838843
Debug: SELECT * from state WHERE inode=6838843
Debug: fetched: []
Debug: INSERT INTO state(inode, mtime, size, md5, timestamp) VALUES (6838843, "1548555031398323200", "3", "acbd18db4cc2f85cedef654fccc4a4d8", "1548555031513735424")
Debug: File '/tmp/dvc-test.30033.yxwz7cwp.e9132f2e-1d64-48f5-95f9-d1c74f71e74d/.dvc/cache/ac/bd18db4cc2f85cedef654fccc4a4d8', md5 'acbd18db4cc2f85cedef654fccc4a4d8', actual 'None'
Debug: Cache type 'reflink' is not supported: reflink is not supported
Debug: Created 'hardlink': /tmp/dvc-test.30033.yxwz7cwp.e9132f2e-1d64-48f5-95f9-d1c74f71e74d/.dvc/cache/ac/bd18db4cc2f85cedef654fccc4a4d8 -> /tmp/dvc-test.30033.yxwz7cwp.e9132f2e-1d64-48f5-95f9-d1c74f71e74d/foo
Debug: Path /tmp/dvc-test.30033.yxwz7cwp.e9132f2e-1d64-48f5-95f9-d1c74f71e74d/foo inode 6838843
Debug: REPLACE INTO link_state(path, inode, mtime) VALUES ("foo", 6838843, "1548555031398323200")
Debug: SELECT count from state_info WHERE rowid=1
Debug: fetched: [(0,)]
Debug: UPDATE state_info SET count = 1 WHERE rowid = 1
Saving information to 'foo.dvc'.
To track the changes with git run:
git add .gitignore foo.dvc
----------------------------- Captured stderr call -----------------------------
Error: failed to install dvc hooks - git hook '.git/hooks/post-checkout' already exists.
------------------------------------------------------------
Traceback (most recent call last):
File "/home/tmain/dvc/dvc/command/install.py", line 8, in run_cmd
self.project.install()
File "/home/tmain/dvc/dvc/project.py", line 177, in install
self.scm.install()
File "/home/tmain/dvc/dvc/scm/git.py", line 169, in install
self._install_hook('post-checkout', 'checkout')
File "/home/tmain/dvc/dvc/scm/git.py", line 163, in _install_hook
raise SCMError(msg.format(os.path.relpath(hook)))
dvc.scm.base.SCMError: git hook '.git/hooks/post-checkout' already exists.
------------------------------------------------------------
Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!
------------------------------ Captured log call -------------------------------
logger.py 15 INFO Adding '.dvc/state' to '.dvc/.gitignore'.
logger.py 15 INFO Adding '.dvc/lock' to '.dvc/.gitignore'.
logger.py 15 INFO Adding '.dvc/config.local' to '.dvc/.gitignore'.
logger.py 15 INFO Adding '.dvc/updater' to '.dvc/.gitignore'.
logger.py 15 INFO Adding '.dvc/updater.lock' to '.dvc/.gitignore'.
logger.py 15 INFO Adding '.dvc/state-journal' to '.dvc/.gitignore'.
logger.py 15 INFO Adding '.dvc/state-wal' to '.dvc/.gitignore'.
logger.py 15 INFO Adding '.dvc/cache' to '.dvc/.gitignore'.
logger.py 15 INFO
You can now commit the changes to git.
logger.py 106 INFO +---------------------------------------------------------------------+
| |
| DVC has enabled anonymous aggregate usage analytics. |
| Read the analytics documentation (and how to opt-out) here: |
| https://dvc.org/doc/user-guide/analytics |
| |
+---------------------------------------------------------------------+

logger.py 15 INFO What's next?
------------
- Check out the documentation: https://dvc.org/doc
- Get help and share ideas: https://dvc.org/chat
- Star us on GitHub: https://github.com/iterative/dvc
logger.py 55 ERROR Error: failed to install dvc hooks - git hook '.git/hooks/post-checkout' already exists.
------------------------------------------------------------
Traceback (most recent call last):
File "/home/tmain/dvc/dvc/command/install.py", line 8, in run_cmd
self.project.install()
File "/home/tmain/dvc/dvc/project.py", line 177, in install
self.scm.install()
File "/home/tmain/dvc/dvc/scm/git.py", line 169, in install
self._install_hook('post-checkout', 'checkout')
File "/home/tmain/dvc/dvc/scm/git.py", line 163, in _install_hook
raise SCMError(msg.format(os.path.relpath(hook)))
dvc.scm.base.SCMError: git hook '.git/hooks/post-checkout' already exists.
------------------------------------------------------------
Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!
logger.py 24 DEBUG Debug: CREATE TABLE IF NOT EXISTS state (inode INTEGER PRIMARY KEY, mtime TEXT NOT NULL, size TEXT NOT NULL, md5 TEXT NOT NULL, timestamp TEXT NOT NULL)
logger.py 24 DEBUG Debug: CREATE TABLE IF NOT EXISTS state_info (count INTEGER)
logger.py 24 DEBUG Debug: CREATE TABLE IF NOT EXISTS link_state (path TEXT PRIMARY KEY, inode INTEGER NOT NULL, mtime TEXT NOT NULL)
logger.py 24 DEBUG Debug: INSERT OR IGNORE INTO state_info (count) SELECT 0 WHERE NOT EXISTS (SELECT * FROM state_info)
logger.py 24 DEBUG Debug: PRAGMA user_version = 3;
logger.py 24 DEBUG Debug: Skipping copying for '/tmp/dvc-test.30033.yxwz7cwp.e9132f2e-1d64-48f5-95f9-d1c74f71e74d/foo', since it is not a symlink or a hardlink.
logger.py 24 DEBUG Debug: checking if '{'scheme': 'local', 'path': '/tmp/dvc-test.30033.yxwz7cwp.e9132f2e-1d64-48f5-95f9-d1c74f71e74d/foo'}'('{}') has changed.
logger.py 24 DEBUG Debug: checksum for '{'scheme': 'local', 'path': '/tmp/dvc-test.30033.yxwz7cwp.e9132f2e-1d64-48f5-95f9-d1c74f71e74d/foo'}' is missing.
logger.py 15 INFO Adding 'foo' to '.gitignore'.
logger.py 15 INFO Saving 'foo' to cache '.dvc/cache'.
logger.py 24 DEBUG Debug: Path /tmp/dvc-test.30033.yxwz7cwp.e9132f2e-1d64-48f5-95f9-d1c74f71e74d/foo inode 6838843
logger.py 24 DEBUG Debug: SELECT * from state WHERE inode=6838843
logger.py 24 DEBUG Debug: fetched: []
logger.py 24 DEBUG Debug: INSERT INTO state(inode, mtime, size, md5, timestamp) VALUES (6838843, "1548555031398323200", "3", "acbd18db4cc2f85cedef654fccc4a4d8", "1548555031513735424")
logger.py 24 DEBUG Debug: File '/tmp/dvc-test.30033.yxwz7cwp.e9132f2e-1d64-48f5-95f9-d1c74f71e74d/.dvc/cache/ac/bd18db4cc2f85cedef654fccc4a4d8', md5 'acbd18db4cc2f85cedef654fccc4a4d8', actual 'None'
logger.py 24 DEBUG Debug: Cache type 'reflink' is not supported: reflink is not supported
logger.py 24 DEBUG Debug: Created 'hardlink': /tmp/dvc-test.30033.yxwz7cwp.e9132f2e-1d64-48f5-95f9-d1c74f71e74d/.dvc/cache/ac/bd18db4cc2f85cedef654fccc4a4d8 -> /tmp/dvc-test.30033.yxwz7cwp.e9132f2e-1d64-48f5-95f9-d1c74f71e74d/foo
logger.py 24 DEBUG Debug: Path /tmp/dvc-test.30033.yxwz7cwp.e9132f2e-1d64-48f5-95f9-d1c74f71e74d/foo inode 6838843
logger.py 24 DEBUG Debug: REPLACE INTO link_state(path, inode, mtime) VALUES ("foo", 6838843, "1548555031398323200")
logger.py 24 DEBUG Debug: SELECT count from state_info WHERE rowid=1
logger.py 24 DEBUG Debug: fetched: [(0,)]
logger.py 24 DEBUG Debug: UPDATE state_info SET count = 1 WHERE rowid = 1
logger.py 15 INFO Saving information to 'foo.dvc'.
logger.py 15 INFO
To track the changes with git run:
git add .gitignore foo.dvc
=========================== 1 failed in 0.73 seconds ===========================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment