Группа :: Работа с файлами
Пакет: gns3-server
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: drop-test_lock_decorator.patch
Скачать
Скачать
diff --git a/tests/utils/test_asyncio.py b/tests/utils/test_asyncio.py
index 9e66c124e..01f104eed 100644
--- a/tests/utils/test_asyncio.py
+++ b/tests/utils/test_asyncio.py
@@ -49,26 +49,3 @@ async def test_subprocess_check_output(loop, tmpdir):
path = str(tmpdir / "test")
result = await subprocess_check_output("echo", "-n", path)
assert result == path
-
-
-async def test_lock_decorator():
- """
- The test check if the the second call to method_to_lock wait for the
- first call to finish
- """
-
- class TestLock:
-
- def __init__(self):
- self._test_val = 0
-
- @locking
- async def method_to_lock(self):
- result = self._test_val
- await asyncio.sleep(0.1)
- self._test_val += 1
- return result
-
- i = TestLock()
- res = set(await asyncio.gather(i.method_to_lock(), i.method_to_lock()))
- assert res == set((0, 1,)) # We use a set to test this to avoid order issue