system: add temporary workaround for getdirinfo() issue

Fixes #670

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2018-06-17 19:14:58 +03:00
parent bca9376a9c
commit 11f7eb0c4e
2 changed files with 39 additions and 1 deletions
+19
View File
@@ -0,0 +1,19 @@
import os
from dvc.system import System
from tests.basic_env import TestDir
class TestSystem(TestDir):
def test_getdirinfo(self):
if os.name != 'nt':
return
# simulate someone holding an exclussive access
locked = 'locked'
fd = os.open(locked, os.O_WRONLY | os.O_CREAT | os.O_EXCL)
# should not raise WinError
info = System.getdirinfo(locked)
os.close(fd)