It's currently not possible to have the debuger stop on an uncaucht
exception when debugging tests. With this patch, adding
`_PYTEST_RAISE=1` to the environment variables in the pytest
configuration template fixes this.
* remove event_loop() fixtures
* flake8
* flake8
* remove sys.exit() from daemon shutdown
* bump full node test timeout. a lot... to see.
* fixup some tests
* back to module scope event loop fixture for test_full_node.py
* Update test_full_node.py
* Iterator...
* for the whole directory
* some fixtures back to module scope for reduced runtime
* back to 40 minute workflow timeouts
* these are being addressed separately
* Add configuration locking
Extracted from https://github.com/Chia-Network/chia-blockchain/pull/10631
* note that fasteners will likely be replaced by filelock
* Fix test_multiple_writers on macOS
* create_all_ssl() doesn't need to be inside the config access lock
* add warnings about not using async within get_config_lock() get lock contexts
* no need to pre-touch the lock file
* .yaml.lock instead of just .lock
* test_multiple_writers() is sync
* Revert "add warnings about not using async within get_config_lock() get lock contexts"
This reverts commit 681af3835b.
* reduce lock context size in chia_init()
* use an exit stack in load_config()
* avoid config existence precheck
* only lock around the read in load_config()
* do not raise e, just raise
* tidy new imports
* fix queue empty check in test_config.py
* remove commented out code in test_config.py
* remove unused import
Co-authored-by: Jeff Cruikshank <jeff@chia.net>
* Better management of KeyringWrapper's keys_root_path when using TempKeyring for tests.
* Move keys_root_path restoration code into `cleanup()`
Added an assert to detect if an unexpected shared KeyringWrapper is injected during a test.
* Conditionally restore keys_root_path for testing
* Use bt fixture
* rebase
* Use local_hostname
* flake8
* Remove set_shared_instance
* Remove unneeded comments
* Revert unrelated change
* Add back type signature - rebase issue
* Correct type for _configure_legacy_backend
* See what's going on during CI mypy run
* github workflows
* mypy typing
* Remove legacy Keyring create method
* Start daemon first
* Set chia-blockchain-gui to hash in main
* Fix two test files that were not importing self_hostname
* self_hostname fixture
* Convert all class fixtures to top level functions
* Added version control enforcement to macOS m1
* Added enforced version control
* Added enforce version compliance
* Added enforced version compliance
* Added enforced versioning
* Updating this to include DRY internal action.
* Removed some unintended whitespace.
* Removed some unintended whitespace.
* CI re-run
* Trying to figure out why it's failing one test.
* Trying to figure out why it's failing one test.
* Trying to figure out why it's failing one test.
If you currently claim rewards `claim_cmd` fails to print the txhash
with the lookup hint in `submit_tx_with_confirmation`
```
Error performing operation on Plot NFT -f 172057028 wallet id: 12:
'dict' object has no attribute 'name'
```
Because `submit_tx_with_confirmation` expects a `TransactionRecord` as
result from its callable parameter `func` but `pw_absorb_rewards`
returns a dict which includes the `TransactionRecord` as value for the
key `transaction`. This PR makes sure all other methods used as `func`
callable have the same return behaviour as `pw_absorb_rewards`. We could
have adjusted it the other way around (only return `TransactionRecord`
in `pw_absorb_rewards`) but then we would drop information in the RPC
client.
With this PR you get:
```
Do chia wallet get_transaction -f 172057028 -tx
0x34f74a1ffd9da9a493b78463e635996fd03d4f805ade583acb9764df73355f9c to
get status
```
* Use bt fixture
* rebase
* Use local_hostname
* Fix test_json (inheritance from unittest.TestCase)
* Use correct BlockTools fixture for test_simulation
* Pass bt fixture into cost calculation tests
* flake8
* Add missing parameters to test functions
* Fix from rebase issues
* Remove set_shared_instance
* Update comment
* Remove unneeded comments
* Remove unused code
* Remove unused code, run `multiprocessing.set_start_method("spawn")` at correct time.
* Revert unrelated change
* Set daemon_port. Teardown services in correct order.
BIG thanks to Mariano Sorgente for debugging help.
* Add back type signature - rebase issue
* Apply review fixes from Jeff
* Document why we need a later pytest-asyncio version
* Correct type for _configure_legacy_backend
* See what's going on during CI mypy run
* github workflows
* mypy typing
* Remove legacy Keyring create method
* Start daemon first
* Shutdown daemon coroutine properly
* Remove un-needed daemon_port argument
* Set chia-blockchain-gui to hash in main
* Remove connect_to_daemon_port
* Remove code that set "daemon_port" before calling `setup_daemon`
* Remove self_hostname fixture and extra self_hostname global
* Fix two test files that were not importing self_hostname
* self_hostname fixture
* Remove more unused test code
* Simplify fixture