commit: a9071c3a0f69bb4c886ddb324e890590e6872680
Author: David Palao <david.palao <AT> gmail <DOT> com>
AuthorDate: Fri Jul 7 14:58:00 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Oct 30 03:14:25 2023 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=a9071c3a
pytest: Add some markers: ft, unit and stress
Add some markers: ft, unit and stress. And mark
test_simple.test_simple_emerge with ft, such that those tests can be
triggered with::
pytest -m ft
Signed-off-by: David Palao <david.palao <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
lib/portage/tests/emerge/test_simple.py | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/lib/portage/tests/emerge/test_simple.py
b/lib/portage/tests/emerge/test_simple.py
index 288cac0f28..f452a84c6b 100644
--- a/lib/portage/tests/emerge/test_simple.py
+++ b/lib/portage/tests/emerge/test_simple.py
@@ -5,6 +5,8 @@ import argparse
import subprocess
import sys
+import pytest
+
import portage
from portage import shutil, os
from portage.const import (
@@ -29,12 +31,19 @@ class BinhostContentMap(Mapping):
self._remote_path = remote_path
self._local_path = local_path
- def __getitem__(self, request_path):
- safe_path = os.path.normpath(request_path)
- if not safe_path.startswith(self._remote_path + "/"):
- raise KeyError(request_path)
- local_path = os.path.join(
- self._local_path, safe_path[len(self._remote_path) + 1 :]
+
[email protected]
+def test_simple_emerge(async_loop, playground, binhost, simple_command):
+ async_loop.run_until_complete(
+ asyncio.ensure_future(
+ _async_test_simple(
+ playground,
+ binhost,
+ simple_command,
+ _METADATA_XML_FILES,
+ loop=async_loop,
+ ),
+ loop=async_loop,
)
try:
with open(local_path, "rb") as f: