mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-27 23:09:28 +01:00
system: add temporary workaround for getdirinfo() issue
Fixes #670 Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user