From e9d9733b32106ef07d4a04eccca0932d0f55571d Mon Sep 17 00:00:00 2001 From: Adamantios Date: Wed, 20 Nov 2024 18:45:05 +0200 Subject: [PATCH] exp2 --- packages/packages.json | 2 +- packages/valory/connections/test_libp2p/connection.yaml | 2 +- packages/valory/connections/test_libp2p/tests/base.py | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 80e2f7747d..41ecaba602 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -21,7 +21,7 @@ "connection/valory/p2p_libp2p_mailbox/0.1.0": "bafybeiecclc65ogngs3piaxpwhiyl77mlpqun5ejlyv4kamwzrrh746guq", "connection/fetchai/local/0.20.0": "bafybeiema4rnxi54luhzbrccb27pfrwlohemka45eqf4nidgmtkwwmxeyi", "connection/valory/http_client/0.23.0": "bafybeihi772xgzpqeipp3fhmvpct4y6e6tpjp4sogwqrnf3wqspgeilg4u", - "connection/valory/test_libp2p/0.1.0": "bafybeiasj7ppsmn24mes2yw3o72nlmcircscalpl3j5ujzxstknlassa3q", + "connection/valory/test_libp2p/0.1.0": "bafybeiauoejf3qngle4vrb5hrpsl3z5cugosuffgkptvm3khu6iainmvg4", "skill/fetchai/echo/0.19.0": "bafybeicoawiackcbgqo3na3e56tpdc62atag4yxknur77py37caqq4mmya", "skill/fetchai/error_test_skill/0.1.0": "bafybeihsbtlpe7h6fsvoxban5rilkmwviwkokul5cqym6atoolirontiyu", "skill/fetchai/gym/0.20.0": "bafybeie7y2fsxfuhsqxqcaluo5exskmrm5q3a6e2hfcskcuvzvxjjhijh4", diff --git a/packages/valory/connections/test_libp2p/connection.yaml b/packages/valory/connections/test_libp2p/connection.yaml index e8df596ec9..4e1213de3a 100644 --- a/packages/valory/connections/test_libp2p/connection.yaml +++ b/packages/valory/connections/test_libp2p/connection.yaml @@ -12,7 +12,7 @@ fingerprint: readme.md: bafybeihg5yfzgqvg5ngy7r2o5tfeqnelx2ffxw4po5hmheqjfhumpmxpoq tests/__init__.py: bafybeiarz6mhky6pnkdihibcuqrfpx3qo55roygneoaoq2mndi5lzdlcj4 tests/acn_image.py: bafybeidkaavxkfocmg5c6y3i32fmbdf5i77jmqteoylmutifoh4zig3pr4 - tests/base.py: bafybeicnngqp7pw6thjf4yjewk6kazaezpfumiob6mfwupdvwxaij6xwwm + tests/base.py: bafybeiaq2gawamzxmfheenvmwv7mb7wtzxal7twy4acapdvuvcbzf7xtke tests/conftest.py: bafybeifkjrvsysdb7ujp2wxurzgytzy3ecu6fv247zfszfymdvb7y7klpu tests/test_certificate_dates.py: bafybeif4t76wsvsfvvplkmi4gecgod6ijff3bbqgtaqmpep6ywfapfptfm tests/test_dht.py: bafybeienykwwpdjlbjzxzttxjhgas2edp2f657gbsexjtkztehoq4yfb7m diff --git a/packages/valory/connections/test_libp2p/tests/base.py b/packages/valory/connections/test_libp2p/tests/base.py index af71953bc6..c0c6a13dd2 100644 --- a/packages/valory/connections/test_libp2p/tests/base.py +++ b/packages/valory/connections/test_libp2p/tests/base.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022-2023 Valory AG +# Copyright 2022-2024 Valory AG # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -308,10 +308,12 @@ def teardown_class(cls): cls._disconnect() cls.multiplexers.clear() cls.log_files.clear() - if Path(cls.cwd).exists(): + cwd = getattr(cls, "cwd", None) + if cwd and Path(cwd).exists(): # can be triggered second time by atexit os.chdir(cls.cwd) - if Path(cls.tmp).exists(): + tmp = getattr(cls, "tmp", None) + if tmp and Path(tmp).exists(): cls.remove_temp_test_dir() logging.debug(f"Teardown of {cls.__name__} completed")