xch-blockchain/pytest.ini

38 lines
1.9 KiB
INI
Raw Normal View History

[pytest]
; logging options
log_cli = False
Catchup/long lived atari from release 1.4.0 46ebed37d8a8cc86ba8c6db511fd936fd53f700d (#11648) * Resend transactions (#11167) * Resend transactions * Don't recheck transactions more frequently than timeout * Add wallet resend parameter to config, move timeout code out of tx store, but close to call site * Add a test for wallet transaction resend * Add test for wallet retry * isort new files for precommit and update workflows * Use correct fixture name * LGTM - remove unused import Co-authored-by: Earle Lowe <e.lowe@chia.net> * less except -> false (#10219) * less except -> false * establish_connection() and .perform_handshake() can just return None * remove more pointless, and no wrong, assertions * Write python version error to stderr (#11239) Co-authored-by: wjblanke <wjb98672@gmail.com> * simplify SizedBytes and StructStream (#11429) * simplify SizedBytes and StructStream * lint * super() !!! * do not pass parameter up to super().__init__() * Update chia/util/struct_stream.py Co-authored-by: Arvid Norberg <arvid@libtorrent.org> * parse fixed-width int data from class name * add int512 and uint128 .from_bytes(), test .parse() failures * test serialization against struct.pack() * use typing_extensions for final * override ignore * stop using struct for StructStream oh the irony * fixup .to_bytes() to accept parameters again for where we use that * bring back signed parameter * format * adjust tests for new exception * eliminate custom coding for uint128 and int512 * tidy * remove unused StructStream.PACK attribute * add direct tests for parse_metadata_from_name() * stricter hinting * remove no-longer-needed typeshed work-around * apply strict type checking to all touched files * remove StructStream override of .to_bytes() * tidy * types touchup * add unused parameter comments Co-authored-by: Arvid Norberg <arvid@libtorrent.org> Co-authored-by: wjblanke <wjb98672@gmail.com> * Allow services to set a non-default max request body size limit (#11516) * updated bls to 13 (#11529) * reduce the redundant computations of coin_ids in block_body_validation (#11530) * add test for streamable -> json conversion (#11527) * add test for streamable -> json conversion * fixup test * Uses the new `from_bytes_unchecked` method in blspy, to improve perfo… (#11463) * Uses the new `from_bytes_unchecked` method in blspy, to improve performance * Update test * Fix merge conflict * Use from_bytes_unchecked in post_init and from_json * More uniform code * rename test files that are missing test_ prefix (#10712) * rename test files that are missing test_ prefix * update mypy and isort excludes * skip test_get_host_addr6() in GitHub Actions under macOS * rebuild workflows * Coin Selection Refactor With CAT Coin Selection Refactor (#9975) * add exact match and best exact match algorithms * optimize algorithm further this might be good. * lint * fix bad logic * add final algorithms * delete lint * oops * Update coin_selection.py * simplify and fix knapsack algoritm * simplify code and correct logic * make it way better. * clarify comments and check for edge cases. * add comments and stuff * improve coin selection addressed comments Thanks! * add coin_selection rpc tests. * clean up and add new unit tests * undo test changes * add extra test cases * move coin_selection to its own function and switch to it for cat and main wallet. * add cat tests * lint * make function align with standards also removed test * make test better * add proper types * Improve code clarity * wallet: fix coin selection bugs * wallet: add an assert just in case * tests: add some sleeps to reduce flakiness * Isort Co-authored-by: Kyle Altendorf <sda@fstab.net> * fix bad merge * lint * fix tests * address aforementioned changes. * remove wallet test * isort * more tests and fixes * lint * rename to amount for coin selection rpc * fix incase we have no smaller coins * fix tests + lint * re add asserts * oops missed me. * lint * fix test * Squashed commit of the following: commit 34a2235de5f120e6e13d3e10a17a514fedeebb5e Author: Jack Nelson <jack@jacknelson.xyz> Date: Wed Apr 13 10:09:42 2022 -0400 clarify comment commit adbf7f4f94867aa5bfbded17ae1e568ab802759c Author: Jack Nelson <jack@jacknelson.xyz> Date: Tue Apr 12 20:27:05 2022 -0400 linty lint commit 5ebc1ac9fdaf61ee5d67f8d35b247ac776a8178e Author: Jack Nelson <jack@jacknelson.xyz> Date: Tue Apr 12 20:17:19 2022 -0400 add failure test and final changes commit 7e5a21b4c2b61455b49e0ec547b98e11a1f6b27d Author: Jack Nelson <jack@jacknelson.xyz> Date: Tue Apr 12 19:35:18 2022 -0400 add descriptions and slim down code commit 31c95b916d0826c197f862bb43b143dabf89eb72 Merge: d7b91295b d9b0ef5f3 Author: Jack Nelson <jack@jacknelson.xyz> Date: Mon Apr 11 10:12:05 2022 -0400 Merge branch 'jack-cat-coinselection' into jn_coinselection_dust commit d7b91295b569a2e86c3042d8207c98ec2d12f681 Author: Jack Nelson <jack@jacknelson.xyz> Date: Sun Apr 10 20:31:09 2022 -0400 lint commit 30dc7c0ab43c57885c55c6f84c3c5f9d0275fc73 Author: Jack Nelson <jack@jacknelson.xyz> Date: Sun Apr 10 20:25:52 2022 -0400 fix tests commit 6c8c2e4874a4a5f68046a6a1d7b6b8b0c6ce961c Author: Jack Nelson <jack@jacknelson.xyz> Date: Thu Mar 31 15:06:00 2022 -0400 remove duplicate code. commit 9f79b6f3044e3c188d2f62871e2f28d747e2e629 Author: Jack Nelson <jack@jacknelson.xyz> Date: Thu Mar 31 15:01:10 2022 -0400 address more concerns commit 67c1b3929f7858da29cc83a2c3e512fbb560f8a6 Author: Jack Nelson <jack@jacknelson.xyz> Date: Thu Mar 31 12:59:05 2022 -0400 fix logic error commit 2d19a5324505de005e5b6a077c43fe368949543b Author: Jack Nelson <jack@jacknelson.xyz> Date: Thu Mar 31 11:47:52 2022 -0400 simplify and de duplicate code commit 6ab1cc79bb2355d42c34df3497e34be861d4ec85 Author: Jack Nelson <jack@jacknelson.xyz> Date: Wed Mar 30 21:34:50 2022 -0400 add function and select individual coin commit 582c17aa8db6a337aca95cc4c7157b542f267ad7 Merge: ce2165942 618fbaeba Author: Jack Nelson <jack@jacknelson.xyz> Date: Wed Mar 30 21:14:37 2022 -0400 Merge branch 'jack-cat-coinselection' into jn_coinselection_dust commit ce2165942972e07de9e1844aa5eb24c06ce0379c Merge: 16aabb3fd 6daba28db Author: Jack Nelson <jack@jacknelson.xyz> Date: Wed Mar 30 20:53:21 2022 -0400 Merge branch 'jack-cat-coinselection' into jn_coinselection_dust commit 16aabb3fd5f459c320dfbecf5af259b90f2a18cb Merge: 0b9fc2845 2286fe426 Author: Jack Nelson <jack@jacknelson.xyz> Date: Wed Mar 30 20:49:02 2022 -0400 Merge branch 'jack-cat-coinselection' into jn_coinselection_dust commit 0b9fc284553138f037d4aef470c7eb7e4a401249 Author: Jack Nelson <jack@jacknelson.xyz> Date: Wed Mar 30 20:38:12 2022 -0400 lint commit 62e74c72f46ec0da33e5efebef3244980d32c967 Author: Jack Nelson <jack@jacknelson.xyz> Date: Wed Mar 30 20:34:22 2022 -0400 fix logic and tests commit e738f44320331cc16ce9456a48709fe8d700f40f Author: Jack Nelson <jack@jacknelson.xyz> Date: Wed Mar 30 18:52:05 2022 -0400 deal with dust and add tests * make sure that we do not use any dust * minor change * address concerns * adjust comments * adjust comment Co-authored-by: Mariano Sorgente <sorgente711@gmail.com> Co-authored-by: Kyle Altendorf <sda@fstab.net> * rebuild workflows (#11543) * remove the cache from CoinStore. It appears the cost of maintaining the cache outweighs the gains. (#11540) * Keep daemon websocket alive during keyring unlock (#11371) * When prompting to unlock the keyring during daemon launch, it's possible that the daemon websocket connection will timeout before the user has entered their passphrase. We can't quickly detect that the connection has timed-out, so instead we now reconnect after collecting the passphrase, unlock the keyring, and then close the old connection. * mypy fix * Switch to using asyncio.loop.run_in_executor to collect the passphrase on its own thread. * Use a new ThreadPoolExecutor configured with 1 worker thread. * Support searching derived addresses on testnet. (#11449) * Support searching derived addresses on testnet. * Added tests * Optimize code to not perform useless subgroup checks (#11546) * Optimize code to not perform useless subgroup checks * Revert less important optimizations * hints and strict type checking for test_wallet (#11541) * hints and strict type checking for test_wallet * fixup * flip flop * disable pytest-monitor by default (#11507) * disable pytest-monitor by default * take 2 * make recurse_jsonify() work directly on types (#11537) * make recurse_jsonify() work directly on types, circumventing the dataclasses.asdict() step. This enables simpler integration of non dataclasses into the Streamable and JSON protocols * add benchmark for Streamable.to_json_dict() * tests: Split up and improve `test_wallet_rpc.py` (#11552) This breaks up the one big test into ``` test_send_transaction test_create_signed_transaction test_create_signed_transaction_with_coin_announcement test_create_signed_transaction_with_puzzle_announcement test_send_transaction_multi test_get_transactions test_get_transaction_count test_cat_endpoints test_offer_endpoints test_key_and_address_endpoints ``` Note that there is still much more room for improvements. Also the following tests can still be split up more: ``` test_get_transactions test_cat_endpoints test_offer_endpoints test_key_and_address_endpoints ``` * Remove unneeded uint64() intermediate in CAT wallet (#11575) * Get get_args() and get_origin() from typing_extensions (#11571) * Get get_args() and get_origin() from typing_extensions * Update streamable.py * cleanup * Fix several flaky tests (#11576) * Increase some of the timeouts to reduce flakiness * Experiment with CI for flakiness * Force more runs * Add argument name * Fix flaky mempool test * Attempt to fix another flaky test * Fix wallet retry test * Missing arg * Lint * Increase benchmark test time * Debug * Debug * Simplify retry test * Lint * More lint * Return false instead of assert * No need to check disconnect twice (since we don't break, this was flaky) * Remove useless changes * Accidental changes revert * Accidental changes revert 2 * Accidental changes revert 3 * Revert fixture * Fix a few additional flaky tests (#11597) * Fix a few additional flaky tests * Lint * Update tests/core/full_node/stores/test_full_node_store.py Co-authored-by: Jeff <jeff@chia.net> * Fix merge conflict * Remove unnecessary function Co-authored-by: Jeff <jeff@chia.net> * Bind port 0 to fix race condition when grabbing available ports (#11578) * port 0 to fix flakiness * Try fixing setup_full_system * Try fixing setup_full_system, and lint * More attempts to fix * No more calls to get random ports in setup_nodes * Revert accidental changes * Timelord extra arg * Try with port 0 * Fix daemon test, and lint * Try without 0.0.0.0 * Back to 0.0.0.0 * Try a few timelord changes to get test running * Increase timeout again * Use the correct interface to get the port * INFO logging to debug issue * Revert "INFO logging to debug issue" This reverts commit 7c379e5ccafbf7c30f9bd467cb1b5868dc8b3f6e. * Fix advertised port log * Add extra log * Logging back * Rollback the timelord changes * Try port 0 timelord * Revert "Try port 0 timelord" This reverts commit 4997faf3b22c0946cba52b1d1719552d24755355. * Try full green, change ordering * Remove unused var * speed up simulation and cleanup * Now try without the port config * Fix a flaky call to get_event_loop * Try getting the port dynamically * No dynamic port * Try changing the ordering * Try adding a sleep * Back to what works * Timelord before vdf clients * Dynamic port for 1st timelord * Revert "Dynamic port for 1st timelord" This reverts commit 0f322a15b7fbc85d41b2758b2625072ac847f350. * Revert "Timelord before vdf clients" This reverts commit 3286c34696d9d2f12304a88511763ac612bc7928. * Revert "Back to what works" This reverts commit 30380dffb76507a5171e2e2f8bb0ce4108039ad6. * Revert "Try adding a sleep" This reverts commit 9212b665a62a86c4c98d52cbd405ffb76221dd8b. * Revert "Try changing the ordering" This reverts commit a62597d70d1dfffde19ca5d82f73847798304ae1. * Revert "No dynamic port" This reverts commit 5d2e15749b3772b375b66317151044556a0e77fa. * Revert "Try getting the port dynamically" This reverts commit ef9cd75679bd235d6767fe30f8371cbca9b6e244. * Revert "Fix a flaky call to get_event_loop" This reverts commit 01a000fdfbe66353edc5ea432ee84e520b2e53d3. * Try one to 0 * Just not 0 * Don't get port dynamically * Cleanup a bit * Fix * Some cleanup work * Some cleanup work * Fix daemon test * Cleanup * Remove arguments * restore missing hints being stored as None (instead of 0-length bytes) (#11568) * Coin simplification (#11567) * factor out as_list() from Coin into free function. Remove unused name_str() from Coin. Minor optimization of hash_coin_ids() for common case. * extend Coin unit test * test installer on fedora:36, drop 33 * add tests.util.misc.assert_maximum_duration for benchmark assertions (#11589) * add tests.util.misc.assert_maximum_duration for benchmark assertions * fix some imports * more * lint * correct duration * hint fixup * rename to caller_file_and_line() * set default timer to thread_time() * extract gc manager and default to disabling * self calibrate overhead * wrap none-ness behind .results() method * add messages * from __future__ import annotations * yield out self * final from typing_extensions * split it * just use Future * tweak * tweak * correction in loosely hint checked file * all future indexing in hints * union for the hints * rename * assert_runtime() * another rename... * message -> label * label all results with test names * oops * early return from _set_spent function (#11594) * check for removals before calling function * move condition to function * remove redundant condition (#11582) * fix built-in profiler to work for mac (#11590) * Bump actions/setup-python from 2 to 3 (#10949) * Bump actions/setup-python from 2 to 3 Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 3. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Fixup templates for python@v3 Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Gene Hoffman <hoffmang@hoffmang.com> * avoid cancelling release/** and long_lived/** (#11519) * tests: Some adjustments in `test_offer_endpoints` (#11558) This is a follow up after #11552 which basically used the initial parts of `test_cat_endpoints` to make `test_offer_endpoints` working. Now this PR drops a lot of the stuff we can assume to be not needed in this test because its tested in `test_cat_endpoints` and it adds some general improvments to it. * async sleep and require connection reset error for DoS test (#11612) * fix jsonify bool * Remove is not None and length assertion in select_coins() (#11569) * Remove is not None and length assertion in select_coins() The `coins is not None` check seems unneeded since `select_coins()` is hinted to return `Set[Coin]`. The length requirement needlessly restricts from being able to request a zero amount. Either situation would either trigger an exception in the next assert, or trigger the assert itself for non-zero amounts requested. * also remove from cat_wallet.py * new port 0 stuff Co-authored-by: Adam Kelly <338792+aqk@users.noreply.github.com> Co-authored-by: Earle Lowe <e.lowe@chia.net> Co-authored-by: Evan Graham <me@luakt.net> Co-authored-by: wjblanke <wjb98672@gmail.com> Co-authored-by: Arvid Norberg <arvid@libtorrent.org> Co-authored-by: Mariano Sorgente <3069354+mariano54@users.noreply.github.com> Co-authored-by: Jack Nelson <jack@jacknelson.xyz> Co-authored-by: Mariano Sorgente <sorgente711@gmail.com> Co-authored-by: Jeff <jeff@chia.net> Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com> Co-authored-by: neurosis69 <83925572+neurosis69@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Gene Hoffman <hoffmang@hoffmang.com> Co-authored-by: William Allen <wallentx@users.noreply.github.com>
2022-05-27 03:11:21 +02:00
addopts = --verbose --tb=short -n auto -p no:monitor
2021-02-07 11:13:25 +01:00
log_level = WARNING
console_output_style = count
2020-06-27 11:19:42 +02:00
log_format = %(asctime)s %(name)s: %(levelname)s %(message)s
asyncio_mode = strict
2022-04-20 04:56:51 +02:00
markers =
benchmark
data_layer: Mark as a data layer related test.
test_mark_a1: used in testing test utilities
test_mark_a2: used in testing test utilities
test_mark_b1: used in testing test utilities
test_mark_b2: used in testing test utilities
testpaths = tests
filterwarnings =
error
ignore:ssl_context is deprecated:DeprecationWarning
ignore:Implicitly cleaning up:ResourceWarning
ignore:unclosed <socket\.socket:ResourceWarning
ignore:Unclosed client session:ResourceWarning
ignore:unclosed file:ResourceWarning
ignore:unclosed transport:ResourceWarning
ignore:coroutine '.*' was never awaited:RuntimeWarning
ignore:`coin_solutions` is now `coin_spends`:UserWarning
ignore:Exception ignored in:pytest.PytestUnraisableExceptionWarning
ignore:cannot collect test class:pytest.PytestCollectionWarning
ignore:The loop argument is deprecated since Python 3\.8, and scheduled for removal in Python 3\.10.:DeprecationWarning
Support for Python 3.10 (#9930) * Support for Python 3.10 * Update install.sh to block Python 3.11 * websockets to 10.1 * Update workflows for Python 3.10 * single quote 3.10 * Enable fedora:35 (py3.10) installer script testing * rebuild workflows * fixup test-install-scripts.yml * add ignore for distutils deprecation in tests for now * asyncio.get_event_loop().run_until_complete() -> asyncio.run() * aiohttp==3.8.1 for python 3.10 support * use ssl.Purpose.CLIENT_AUTH for ssl_context_for_server() * rebuild workflows * use ssl_context_for_client() in BlockTools.get_daemon_ssl_context() * create a client context for the RpcServer to connect to the daemon * go back to asyncio.get_event_loop().run_until_complete() for now to recover 3.7 * ignore:There is no current event loop:DeprecationWarning * Ms.plot load perf2 (#10978) * 2.7 seconds -> 0.45 seconds * Merge * Work on create_plots refactor * Try to fix tests * Try to fix tests * Use new functions * Fix block_tools by adding dir * Extra argument * Try to fix cyclic import * isort * Drop warning * Some cleanups around `exclude_final_dir` and directory adding * Cleanup `min_mainnet_k_size` checks * Drop unrelated changes * Fixes after rebase * Fix cyclic import * Update tests/block_tools.py Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com> * Update tests/block_tools.py Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com> Co-authored-by: xdustinface <xdustinfacex@gmail.com> Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com> * remove 3.10 avoidance step from debian:bookworm installer testing * add 3.10 to wheel availability check workflow * add 3.10 to Install.ps1 supported Python versions for Windows * add jammy jellyfish to the install script test matrix * correct ubuntu:jammy job name * add 22.04 with Python 3.10 to install.sh Co-authored-by: Gene Hoffman <hoffmang@hoffmang.com> Co-authored-by: Yostra <straya@chia.net> Co-authored-by: Mariano Sorgente <3069354+mariano54@users.noreply.github.com> Co-authored-by: xdustinface <xdustinfacex@gmail.com> Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
2022-04-26 21:37:01 +02:00
ignore:The distutils package is deprecated:DeprecationWarning
ignore:There is no current event loop:DeprecationWarning
Add Windows CI (#10681) * Add Windows CI * rebuild workflows * rebuild workflows * try different activation * catch up windows workflow template * debug dir * hard code dev extra on windows * it is pytest * .exe * -m pytest for windows * --module pytest * Revert "debug dir" This reverts commit 74b5bbfd920d3d085e14823c81af87f230052006. * debug pkg_resources import on windows * debug tests.conftest import on windows * rebuild workflows * debug * debug oops * debug more * debug more * Update pytest.ini * Update pytest.ini * fix it * Revert "debug more" This reverts commit 367ed61dfa9f82f19a8f64481581e411a6227ec8. * Revert "debug more" This reverts commit 772b6707c601525129bed06220fb224f37a6d95f. * Revert "debug oops" This reverts commit 5065c1e172061c77842c1e36038c1f2b4f6d7c5e. * Revert "debug" This reverts commit ecf721e453c787103278c9fa8c57c118deb29459. * Revert "debug tests.conftest import on windows" This reverts commit ea71a51625a95103655e3316659a34c0b714d879. * Revert "debug pkg_resources import on windows" This reverts commit eb6afb1dfb7dda9564450b7906055e17b60d39e3. * more warning ignore * they're regexes... * --numprocesses 0 for windows ci * specify each test file individually since pytest on windows does not seem to handle the wildcards * relative... * select most recent supported python on windows, support INSTALL_PYTHON_VERSION * sort test files when generating workflows * report full python version on windows, actually use the selected version for the env * oops * debug dir * skip timelord-requiring jobs on windows * oops * handle wildcard expansion for coverage on windows * rebuild workflows * download blocks and plots on windows * correct and and or in yaml * -d for Install.ps1 * git config --global core.autocrlf false * add missing windows plot_sync workflow * no check resource usage on windows * delete outdated windows workflows that need the timelord * catch up windows workflow template * try again without xdist * rebuild workflows * Revert "try again without xdist" This reverts commit 4bedf5f047db79684194db5f72fe4017fb078f04. * maybe now no xdist on windows * maybe now no xdist on windows * rebuild workflows * debug chiapos==1.0.9 * Revert "debug chiapos==1.0.9" This reverts commit 4b374e128a4d546e96acd56451a3d64322f6f1f9. * debug blspy==1.0.9 * catch up windows workflow template * rebuild workflows * Various windows CI fixes * Windows CI fixes and workflow updates * ignore another warning for the keyring * pre-commit fixup * rebuild workflows * catchup windows test workflows with long_lived/** and release/** setup * Update test_full_sync.py * Try without parallelization * Some other tweaks for windows * some more timeout tweaks * more timeout tweaks for windows * rebuild workflows * Adjusting more timeouts * Skip ipv6 test on windows * More timeout tweaks * More timeout adjustments * More time out adjustments * more windows tweaks * Try running some things with -n 0 * Fix up windows test template and re-gen workflows * Try this again * Try all windows tests with -n 0 * misc update * Undo some timeout changes * Adjust timeout * Increase timeout * Coverage combine should combine the files in the current directory * Trying retry test on windows * timeout adjustment * use tmp_path * Few minor updates based on review * lint fix * Update tests/build-workflows.py * Update tests/core/server/test_dos.py * Try windows with pytest xdist n=2 * Check windows with xdist n=3 * Trying n=2 again * Adjust timeout * Update testconfig.py * Update build-workflows.py * Update testconfig.py * Update .pre-commit-config.yaml * Update testconfig.py * Update build-workflows.py * Update build-test-macos * Update build-test-ubuntu * Update build-test-windows * skip * Apply suggestions from code review * tidy * Update test_pool_config.py Co-authored-by: Earle Lowe <e.lowe@chia.net> Co-authored-by: Earle Lowe <30607889+emlowe@users.noreply.github.com>
2022-05-31 21:04:45 +02:00
ignore:getargs. The 'u' format is deprecated. Use 'U' instead.:DeprecationWarning
ignore:BackendFinder.find_spec\(\) not found; falling back to find_module\(\):ImportWarning
ignore:BackendLoader.exec_module\(\) not found; falling back to load_module\(\):ImportWarning
ignore:The --rsyncdir command line argument and rsyncdirs config variable are deprecated.:DeprecationWarning
ignore:Properties from keyring.util are no longer supported. Use jaraco.classes.properties instead.:DeprecationWarning
ignore:pkg_resources is deprecated as an API:DeprecationWarning