From f8eb3dc5f98282387dcaac0b72d952afb11799e6 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 5 Feb 2023 20:30:37 -0500 Subject: [PATCH 1/2] fix formatting --- src/nile/common.py | 2 +- tests/commands/test_deploy.py | 1 - tests/core/types/test_transactions.py | 4 +--- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/nile/common.py b/src/nile/common.py index bd1ef0fb..afa38406 100644 --- a/src/nile/common.py +++ b/src/nile/common.py @@ -90,7 +90,7 @@ def get_all_contracts(ext=None, directory=None): ext = ".cairo" files = list() - for (dirpath, _, filenames) in os.walk( + for dirpath, _, filenames in os.walk( directory if directory else CONTRACTS_DIRECTORY ): files += [ diff --git a/tests/commands/test_deploy.py b/tests/commands/test_deploy.py index ff16311f..9b243574 100644 --- a/tests/commands/test_deploy.py +++ b/tests/commands/test_deploy.py @@ -62,7 +62,6 @@ async def test_deploy_contract( overriding_path, watch_mode, ): - logging.getLogger().setLevel(logging.INFO) account = await MockAccount("TEST_KEY", NETWORK) diff --git a/tests/core/types/test_transactions.py b/tests/core/types/test_transactions.py index df08556f..8f0de8af 100644 --- a/tests/core/types/test_transactions.py +++ b/tests/core/types/test_transactions.py @@ -277,7 +277,6 @@ async def test_deploy_account_transaction_init_defaults(mock_get_class_hash): async def test_transaction_execute( mock_status, mock_call_args, mock_get_tx_hash, watch_mode ): - account = await MockAccount(KEY, NETWORK) mock_sig_r, mock_sig_s = account.signer.sign(TX_HASH) with patch("nile.core.types.transactions.execute_call") as mock_execute_call: @@ -315,7 +314,6 @@ async def test_transaction_execute( return_value={"param": "value"}, ) async def test_transaction_estimate_fee(mock_call_args, mock_get_tx_hash, caplog): - account = await MockAccount(KEY, NETWORK) mock_sig_r, mock_sig_s = account.signer.sign(TX_HASH) exp_output = 1000 @@ -356,7 +354,6 @@ async def test_transaction_estimate_fee(mock_call_args, mock_get_tx_hash, caplog return_value={"param": "value"}, ) async def test_transaction_simulate(mock_call_args, mock_get_tx_hash, caplog): - account = await MockAccount(KEY, NETWORK) mock_sig_r, mock_sig_s = account.signer.sign(TX_HASH) with patch("nile.core.types.transactions.execute_call") as mock_execute_call: @@ -566,3 +563,4 @@ async def test_deploy_account_get_execute_call_args( "overriding_path": tx.overriding_path, "calldata": tx.calldata, } + From d3c92945ee63c4f9bd5177061b9aa90147d8dcc8 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 5 Feb 2023 20:31:32 -0500 Subject: [PATCH 2/2] remove line --- tests/core/types/test_transactions.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/core/types/test_transactions.py b/tests/core/types/test_transactions.py index 8f0de8af..c2d5b6cd 100644 --- a/tests/core/types/test_transactions.py +++ b/tests/core/types/test_transactions.py @@ -563,4 +563,3 @@ async def test_deploy_account_get_execute_call_args( "overriding_path": tx.overriding_path, "calldata": tx.calldata, } -