Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37712878
en ru br
Репозитории ALT

Группа :: Работа с файлами
Пакет: 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
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin