mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-01 23:08:43 +01:00
20 lines
427 B
Python
20 lines
427 B
Python
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
|
|
System.getdirinfo(locked)
|
|
|
|
os.close(fd)
|