Commit Graph

12 Commits

Author SHA1 Message Date
Kyle Altendorf
3b084a165b
configure isort to add the future annotations import (#13327)
* configure isort to add the future annotations import

* apply the new isort setting

* remove type ignores for new mypy (#13539)

https://pypi.org/project/mypy/0.981/

* another
2022-09-30 03:40:22 -05:00
dustinface
7c9fb654a3
server|tests: Delay the harvester -> farmer connection in some tests (#12862)
* Introduce `Service.add_peer`

* Delay the harvester/farmer connection in some tests to avoid flakiness
2022-08-10 04:57:34 -05:00
dustinface
aa0e996ac5
util: Drop partially implemented BIP39 passphrase support (#12748) 2022-08-06 09:50:33 -05:00
Jack Nelson
0bc54ae08b
Move simulator test requirements over to new module (#12521)
* create new test.simulator module

to allow other packages to use the simulator without it crashing.
also tiny QOL fixes

* change user mode sim plot filter

Now only plots matching the user set fingerprint are loaded, this decreases the chance of user error.

* fix small oops in configure

* oops

* fix lint

* isort, who dis

* move folder over to chia/simulator

also change mypy settings again
2022-07-25 14:07:38 -05:00
Jack Nelson
bd5d4b1392
remove extra bt from as many tests as possible ( speed up tests) (#12290)
* remove extra bt from as many tests as possible

max speed

* wallet bt tools removal

* fix error & add bt_tools to yield

* final changes

L bozo

* something funky going on

* fix issues

* a couple more fixes

* mypy happy

* damn lint

* Revert "something funky going on"

This reverts commit 1fcc9a34e1.
2022-07-13 03:57:32 -05:00
dustinface
7142ebcae7
tests: Consolidate farmer/harvester fixtures (#11513)
* tests: Consolidate farmer/harvester fixtures

* Fixup after #11578
2022-05-25 15:15:49 -07:00
dustinface
7ed610bc84
test: Give setup_farmer and setup_harvester a separate chia root (#11408)
* test: Give `setup_farmer` and `setup_harvester` a separate chia root

* test: Wait for `last_sync_time` in `get_harvesters_{summary}`

To make sure the first sync from the harvester to the farmer is done 
before we check plot counts.
2022-05-02 19:32:37 -07:00
Amine Khaldi
a2fa8dda01
Prepare test blocks and plots only for tests that need them. This saves us a couple more hours of CI running time. (#10975) 2022-04-05 10:34:57 -07:00
Adam Kelly
37843ee044
Change name to order of returned values. Enforce mandatory naming and inclusion of start_services parameter (#10769) 2022-03-17 08:39:30 -07:00
Adam Kelly
ff324095cc
Remove block tools and keychain globals (#10358)
* 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
2022-03-10 11:06:49 -08:00
Arvid Norberg
ce533879e2
run pytest in strict asyncio mode. add missing @pytest.mark.asyncio (#10230) 2022-02-16 11:01:04 -05:00
dustinface
b76b75f317
farmer|server|tests: Fix for farmer service crash if the keychain is empty (#9515)
* farmer: Run a start background task to wait if there are no keys yet

* farmer: Run the handshake in a background task if there are no keys yet

* tests: Yield the service in farmer/harvester setups

* tests: Introduce `start_service` in farmer/harvester setups

* server: Make `ChiaServer` and `Service` restartable

* tests: Test the delayed start/handshake in `test_farmer_harvester.py`

* tests: Move `test_farmer_harvester.py` to `tests/core/farmer_harvester`

Attempt to avoid issues due to the global block tools / shared keychain 
between tests

* farmer: Return `bool` in `Farmer.setup_keys`

* tests: Add `__init__.py` to `tests/farmer_harvester`
2021-12-14 18:03:59 -08:00