def setup(): assert hasattr(pyhmy, "__version__") assert pyhmy.__version__.major == 20, "wrong pyhmy version" assert pyhmy.__version__.minor == 1, "wrong pyhmy version" assert pyhmy.__version__.micro >= 14, "wrong pyhmy version, update please" env = cli.download("./bin/hmy", replace=False) cli.environment.update(env) cli.set_binary("./bin/hmy")
def setup(): # hmy cli currently not used, but piped for future use. assert hasattr(pyhmy, "__version__") assert pyhmy.__version__.major == 20, "wrong pyhmy version" assert pyhmy.__version__.minor == 1, "wrong pyhmy version" assert pyhmy.__version__.micro >= 14, "wrong pyhmy version, update please" env = hmy.download(f"{file_dir}/bin/hmy", replace=False) hmy.environment.update(env) hmy.set_binary(f"{file_dir}/bin/hmy")
def setup(): assert hasattr(pyhmy, "__version__") assert pyhmy.__version__.major == 20, "wrong pyhmy version" assert pyhmy.__version__.minor == 1, "wrong pyhmy version" assert pyhmy.__version__.micro >= 14, "wrong pyhmy version, update please" env = cli.download("./bin/hmy", replace=False) cli.environment.update(env) cli.set_binary("./bin/hmy") if os.path.exists(private_keys_dir): shutil.rmtree(private_keys_dir) os.makedirs(private_keys_dir) if os.path.exists(pops_keys_dir): shutil.rmtree(pops_keys_dir) os.makedirs(pops_keys_dir) if os.path.exists(internal_keys_dir): shutil.rmtree(internal_keys_dir) os.makedirs(internal_keys_dir)
def setup(): cli.environment.update(cli.download("./bin/hmy", replace=False)) cli.set_binary("./bin/hmy")
import sys sys.path.append("../") from pyhmy import cli import os #set up binnary path env = cli.download("./bin/test", replace=False) cli.environment.update(env) new_path = os.getcwd() + "/bin/test" cli.set_binary(new_path) print("The binary path is %s"%(cli.get_binary_path())) #get a dict of account names name_dict = cli.get_accounts_keystore() print(name_dict) #get keystore path print("Your accounts are store in %s"%(cli.get_account_keystore_path())) if "difeng" not in name_dict.keys(): #create a user cli.single_call("hmy keys add difeng") print("difeng has been successfully created") if "dfxx" not in name_dict.keys(): #create a user cli.single_call("hmy keys add dfxx") print("dfxx has been successfully created") if "test1" not in name_dict.keys(): #create a user
def test_download_cli(): env = cli.download(BINARY_FILE_PATH, replace=False, verbose=False) cli.environment.update(env) assert os.path.exists(BINARY_FILE_PATH)