Fix all tests skipped (#294)

Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
This commit is contained in:
merwanehamadi
2023-08-12 10:19:02 -07:00
committed by GitHub
parent 2273396124
commit e1c043975f

View File

@@ -1,3 +1,4 @@
import asyncio
import glob
import importlib
import json
@@ -97,7 +98,7 @@ def create_single_test(
)
# Define test method within the dynamically created class
async def test_method(self, config: Dict[str, Any], request) -> None: # type: ignore
def test_method(self, config: Dict[str, Any], request) -> None: # type: ignore
# create a random number between 0 and 1
test_name = self.data.name
@@ -127,8 +128,9 @@ def create_single_test(
timeout = 100000
if "--cutoff" in sys.argv:
timeout = int(sys.argv[sys.argv.index("--cutoff") + 1])
await self.setup_challenge(config, timeout)
asyncio.get_event_loop().run_until_complete(
self.setup_challenge(config, timeout)
)
scores = self.get_scores(config)
request.node.scores = scores # store scores in request.node