diff --git a/chia/_tests/cmds/wallet/test_wallet.py b/chia/_tests/cmds/wallet/test_wallet.py index 9411b08c141d..751c55f1965e 100644 --- a/chia/_tests/cmds/wallet/test_wallet.py +++ b/chia/_tests/cmds/wallet/test_wallet.py @@ -38,7 +38,7 @@ from chia.wallet.util.wallet_types import WalletType from chia.wallet.wallet_coin_store import GetCoinRecords -test_offer_file_path = importlib_resources.files(__name__).joinpath("test_offer.toffer") +test_offer_file_path = importlib_resources.files(__name__.rpartition(".")[0]).joinpath("test_offer.toffer") test_offer_file_bech32 = test_offer_file_path.read_text(encoding="utf-8") test_offer_id: str = "0xdfb7e8643376820ec995b0bcdb3fc1f764c16b814df5e074631263fcf1e00839" test_offer_id_bytes: bytes32 = bytes32.from_hexstr(test_offer_id) diff --git a/chia/_tests/util/benchmarks.py b/chia/_tests/util/benchmarks.py index 54d24e055836..d80a0a0a4a76 100644 --- a/chia/_tests/util/benchmarks.py +++ b/chia/_tests/util/benchmarks.py @@ -20,7 +20,7 @@ # farmer puzzle hash ph = bytes32(b"a" * 32) -clvm_generator_bin_path = importlib_resources.files(__name__).joinpath("clvm_generator.bin") +clvm_generator_bin_path = importlib_resources.files(__name__.rpartition(".")[0]).joinpath("clvm_generator.bin") clvm_generator = clvm_generator_bin_path.read_bytes() diff --git a/chia/cmds/installers.py b/chia/cmds/installers.py index 2c479554be1e..8ffed570146c 100644 --- a/chia/cmds/installers.py +++ b/chia/cmds/installers.py @@ -119,3 +119,11 @@ def test_command(expected_chia_version_str: str, require_madmax: bool) -> None: # expected_output=b"\nBladebit Chia Plotter", # specify_tmp_dir=False, # ) + + args = [executable_for_service("chia"), "init"] + print(f"launching: {args}") + subprocess.run( + args, + check=True, + timeout=adjusted_timeout(30), + ) diff --git a/chia/ssl/create_ssl.py b/chia/ssl/create_ssl.py index 13c01448fd52..fd16332d3921 100644 --- a/chia/ssl/create_ssl.py +++ b/chia/ssl/create_ssl.py @@ -29,7 +29,7 @@ def get_chia_ca_crt_key() -> Tuple[Any, Any]: - here = importlib_resources.files(__name__) + here = importlib_resources.files(__name__.rpartition(".")[0]) crt = here.joinpath("chia_ca.crt").read_bytes() key = here.joinpath("chia_ca.key").read_bytes() return crt, key diff --git a/chia/util/config.py b/chia/util/config.py index c6484c803565..b8caed149856 100644 --- a/chia/util/config.py +++ b/chia/util/config.py @@ -25,7 +25,7 @@ def initial_config_file(filename: Union[str, Path]) -> str: - initial_config_path = importlib_resources.files(__name__).joinpath(f"initial-{filename}") + initial_config_path = importlib_resources.files(__name__.rpartition(".")[0]).joinpath(f"initial-{filename}") contents: str = initial_config_path.read_text(encoding="utf-8") return contents diff --git a/chia/util/keychain.py b/chia/util/keychain.py index f1c4f858a04d..fcf7918ffc80 100644 --- a/chia/util/keychain.py +++ b/chia/util/keychain.py @@ -55,7 +55,7 @@ def set_keys_root_path(keys_root_path: Path) -> None: def bip39_word_list() -> str: - word_list_path = importlib_resources.files(__name__).joinpath("english.txt") + word_list_path = importlib_resources.files(__name__.rpartition(".")[0]).joinpath("english.txt") contents: str = word_list_path.read_text(encoding="utf-8") return contents