mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-08-29 10:06:27 -05:00
Merge remote-tracking branch 'origin/main' into quex.port_test_wallet
This commit is contained in:
+1
-2
@@ -5,9 +5,8 @@ disable_warnings=
|
||||
relative_files=True
|
||||
source_pkgs=
|
||||
chia
|
||||
tests
|
||||
omit=
|
||||
tests/**/config.py
|
||||
chia/_tests/**/config.py
|
||||
concurrency=multiprocessing, thread
|
||||
parallel=True
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ exclude = ./typings/**/*
|
||||
ignore = E203,W503
|
||||
extend-ignore = E226,E704,E701
|
||||
per-file-ignores =
|
||||
tests/util/build_network_protocol_files.py:F405
|
||||
tests/util/test_network_protocol_files.py:F405
|
||||
tests/util/test_network_protocol_json.py:F405
|
||||
tests/util/protocol_messages_json.py:E501
|
||||
chia/_tests/util/build_network_protocol_files.py:F405
|
||||
chia/_tests/util/test_network_protocol_files.py:F405
|
||||
chia/_tests/util/test_network_protocol_json.py:F405
|
||||
chia/_tests/util/protocol_messages_json.py:E501
|
||||
|
||||
@@ -106,7 +106,7 @@ jobs:
|
||||
|
||||
- name: pytest
|
||||
run: |
|
||||
pytest -n 0 --capture no -m benchmark -o 'junit_suite_name=benchmarks' --junitxml=junit-data/benchmarks.raw.xml --benchmark-repeats ${{ needs.setup.outputs.repeats }} tests
|
||||
pytest -n 0 --capture no -m benchmark -o 'junit_suite_name=benchmarks' --junitxml=junit-data/benchmarks.raw.xml --benchmark-repeats ${{ needs.setup.outputs.repeats }} chia/_tests/
|
||||
|
||||
- name: Format JUnit data and prepare results
|
||||
if: always()
|
||||
@@ -124,4 +124,4 @@ jobs:
|
||||
- name: Add benchmark results to workflow summary
|
||||
if: always()
|
||||
run: |
|
||||
python -m tests.process_junit --type benchmark --xml junit-data/benchmarks.xml --markdown --link-prefix ${{ github.event.repository.html_url }}/blob/${{ github.sha }}/ --link-line-separator \#L >> "$GITHUB_STEP_SUMMARY"
|
||||
python -m chia._tests.process_junit --type benchmark --xml junit-data/benchmarks.xml --markdown --link-prefix ${{ github.event.repository.html_url }}/blob/${{ github.sha }}/ --link-line-separator \#L >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
@@ -220,6 +220,15 @@ jobs:
|
||||
sh install-timelord.sh -n
|
||||
./vdf_bench square_asm 400000
|
||||
|
||||
- name: Verify source and installed tests match
|
||||
run: |
|
||||
echo '==== collecting source tests ===='
|
||||
pytest --collect-only -qq --import-mode=prepend chia/_tests/ | sed -n 's;^\(chia/_tests/.*\);\1;p' | sort | tee source_tests
|
||||
echo '==== collecting installed tests ===='
|
||||
pytest --collect-only -qq --import-mode=append --pyargs chia._tests | sed -n 's;^venv/.*/\(chia/_tests/.*\);\1;p' | sort | tee installed_tests
|
||||
echo '==== diffing collected tests ===='
|
||||
diff --unified source_tests installed_tests
|
||||
|
||||
- name: Move chia/ so we test the installed code
|
||||
run: |
|
||||
mv chia/ notchia/
|
||||
@@ -228,7 +237,7 @@ jobs:
|
||||
env:
|
||||
ENABLE_PYTEST_MONITOR: ${{ matrix.os.matrix == 'ubuntu' && matrix.configuration.enable_pytest_monitor || '' }}
|
||||
run: |
|
||||
pytest --cov=chia --cov=tests --cov-config=.coveragerc --cov-report= -o 'junit_suite_name=${{ env.JOB_FILE_NAME }}' --junitxml='junit-data/junit.${{ env.JOB_FILE_NAME }}.xml' --durations=10 ${{ matrix.configuration.pytest_parallel_args[matrix.os.matrix] }} -m "not benchmark" ${{ env.ENABLE_PYTEST_MONITOR }} ${{ matrix.configuration.test_files }}
|
||||
pytest --cov=chia --cov-config=.coveragerc --cov-report= -o 'junit_suite_name=${{ env.JOB_FILE_NAME }}' --junitxml='junit-data/junit.${{ env.JOB_FILE_NAME }}.xml' --durations=10 ${{ matrix.configuration.pytest_parallel_args[matrix.os.matrix] }} -m "not benchmark" ${{ env.ENABLE_PYTEST_MONITOR }} ${{ matrix.configuration.test_files }}
|
||||
|
||||
- name: Move back to chia/ for coverage
|
||||
run: |
|
||||
@@ -260,4 +269,4 @@ jobs:
|
||||
if: matrix.os.matrix == 'ubuntu' && matrix.configuration.check_resource_usage
|
||||
run: |
|
||||
sqlite3 -readonly -separator " " .pymon "select item,cpu_usage,total_time,mem_usage from TEST_METRICS order by mem_usage desc;" >metrics.out
|
||||
./tests/check_pytest_monitor_output.py <metrics.out
|
||||
./chia/_tests/check_pytest_monitor_output.py <metrics.out
|
||||
|
||||
@@ -40,7 +40,7 @@ jobs:
|
||||
- name: Generate matrix configuration
|
||||
id: configure
|
||||
run: |
|
||||
python tests/build-job-matrix.py --per directory --verbose > matrix.json
|
||||
python chia/_tests/build-job-matrix.py --per directory --verbose > matrix.json
|
||||
cat matrix.json
|
||||
echo configuration=$(cat matrix.json) >> "$GITHUB_OUTPUT"
|
||||
echo matrix_mode=${{ ( github.event_name == 'schedule' ) && 'all' || ( github.event_name == 'workflow_dispatch' ) && 'all' || ( github.repository_owner == 'Chia-Network' && github.repository != 'Chia-Network/chia-blockchain' ) && 'limited' || ( github.repository_owner == 'Chia-Network' && github.repository == 'Chia-Network/chia-blockchain' && github.ref == 'refs/heads/main' ) && 'main' || ( github.repository_owner == 'Chia-Network' && github.repository == 'Chia-Network/chia-blockchain' && startsWith(github.ref, 'refs/heads/release/') ) && 'all' || ( github.repository_owner == 'Chia-Network' && github.repository == 'Chia-Network/chia-blockchain' && startsWith(github.base_ref, 'release/') ) && 'all' || 'main' }} >> "$GITHUB_OUTPUT"
|
||||
@@ -164,8 +164,8 @@ jobs:
|
||||
- name: Add time out assert results to workflow summary
|
||||
if: always()
|
||||
run: |
|
||||
python -m tests.process_junit --limit 50 --type time_out_assert --xml junit-results/junit.xml --markdown --link-prefix ${{ github.event.repository.html_url }}/blob/${{ github.sha }}/ --link-line-separator \#L >> "$GITHUB_STEP_SUMMARY"
|
||||
python -m tests.process_junit --type time_out_assert --xml junit-results/junit.xml --markdown --link-prefix ${{ github.event.repository.html_url }}/blob/${{ github.sha }}/ --link-line-separator \#L >> junit-results/time_out_assert.md
|
||||
python -m chia._tests.process_junit --limit 50 --type time_out_assert --xml junit-results/junit.xml --markdown --link-prefix ${{ github.event.repository.html_url }}/blob/${{ github.sha }}/ --link-line-separator \#L >> "$GITHUB_STEP_SUMMARY"
|
||||
python -m chia._tests.process_junit --type time_out_assert --xml junit-results/junit.xml --markdown --link-prefix ${{ github.event.repository.html_url }}/blob/${{ github.sha }}/ --link-line-separator \#L >> junit-results/time_out_assert.md
|
||||
|
||||
- name: Publish JUnit results
|
||||
if: always()
|
||||
@@ -190,13 +190,13 @@ jobs:
|
||||
if: always()
|
||||
run: |
|
||||
set -o pipefail
|
||||
coverage report --rcfile=.coveragerc --data-file=coverage-reports/.coverage --include='chia/**/*' --show-missing | tee coverage-reports/coverage-chia-stdout
|
||||
coverage report --rcfile=.coveragerc --data-file=coverage-reports/.coverage --include='chia/**/*' --omit='chia/_tests/**/*' --show-missing | tee coverage-reports/coverage-chia-stdout
|
||||
|
||||
- name: Coverage report (tests/)
|
||||
- name: Coverage report (chia/_tests/)
|
||||
if: always()
|
||||
run: |
|
||||
set -o pipefail
|
||||
coverage report --rcfile=.coveragerc --data-file=coverage-reports/.coverage --include='tests/**/*' --show-missing | tee coverage-reports/coverage-tests-stdout
|
||||
coverage report --rcfile=.coveragerc --data-file=coverage-reports/.coverage --include='chia/_tests/**/*' --show-missing | tee coverage-reports/coverage-tests-stdout
|
||||
|
||||
- name: Coverage report (diff)
|
||||
if: (github.base_ref != '' || github.event.before != '') && always()
|
||||
|
||||
@@ -128,12 +128,12 @@ jobs:
|
||||
- name: black
|
||||
command: black --check --diff .
|
||||
- name: flake8
|
||||
command: flake8 benchmarks build_scripts chia tests tools *.py
|
||||
command: flake8 benchmarks build_scripts chia tools *.py
|
||||
- name: pylint
|
||||
command: pylint benchmarks build_scripts chia tests tools *.py
|
||||
command: pylint benchmarks build_scripts chia tools *.py
|
||||
- name: generated protocol tests
|
||||
command: |
|
||||
python3 -m tests.util.build_network_protocol_files
|
||||
python3 -m chia._tests.util.build_network_protocol_files
|
||||
git diff --exit-code
|
||||
|
||||
steps:
|
||||
|
||||
@@ -3,14 +3,14 @@ repos:
|
||||
hooks:
|
||||
- id: check-sql
|
||||
name: Validate SQL statements
|
||||
entry: ./activated.py python -m tests.check_sql_statements
|
||||
entry: ./activated.py python -m chia._tests.check_sql_statements
|
||||
language: system
|
||||
pass_filenames: false
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: init_py_files
|
||||
name: __init__.py files
|
||||
entry: ./activated.py python tests/build-init-files.py -v --root .
|
||||
entry: ./activated.py python chia/_tests/build-init-files.py -v --root .
|
||||
language: system
|
||||
pass_filenames: false
|
||||
- repo: local
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@ provided configuration with `pre-commit install`.
|
||||
4. Preferences > Settings > Python > Linting > flake8 enabled
|
||||
5. Preferences > Settings > Python > Linting > mypy enabled
|
||||
6. Preferences > Settings > Formatting > Python > Provider > black
|
||||
7. Preferences > Settings > mypy > Targets: set to `./chia` and `./tests`
|
||||
7. Preferences > Settings > mypy > Targets: set to `./chia`
|
||||
|
||||
## Configure Pycharm
|
||||
|
||||
|
||||
+11
-11
@@ -9,6 +9,17 @@ from time import monotonic
|
||||
from typing import List
|
||||
|
||||
from benchmarks.utils import setup_db
|
||||
from chia._tests.util.benchmarks import (
|
||||
clvm_generator,
|
||||
rand_bytes,
|
||||
rand_class_group_element,
|
||||
rand_g1,
|
||||
rand_g2,
|
||||
rand_hash,
|
||||
rand_vdf,
|
||||
rand_vdf_proof,
|
||||
rewards,
|
||||
)
|
||||
from chia.consensus.block_record import BlockRecord
|
||||
from chia.full_node.block_store import BlockStore
|
||||
from chia.types.blockchain_format.foliage import Foliage, FoliageBlockData, FoliageTransactionBlock, TransactionsInfo
|
||||
@@ -20,17 +31,6 @@ from chia.types.blockchain_format.sized_bytes import bytes32
|
||||
from chia.types.blockchain_format.sub_epoch_summary import SubEpochSummary
|
||||
from chia.types.full_block import FullBlock
|
||||
from chia.util.ints import uint8, uint32, uint64, uint128
|
||||
from tests.util.benchmarks import (
|
||||
clvm_generator,
|
||||
rand_bytes,
|
||||
rand_class_group_element,
|
||||
rand_g1,
|
||||
rand_g2,
|
||||
rand_hash,
|
||||
rand_vdf,
|
||||
rand_vdf_proof,
|
||||
rewards,
|
||||
)
|
||||
|
||||
# to run this benchmark:
|
||||
# python -m benchmarks.coin_store
|
||||
|
||||
@@ -7,10 +7,10 @@ from contextlib import contextmanager
|
||||
from subprocess import check_call
|
||||
from typing import Iterator
|
||||
|
||||
from chia._tests.util.blockchain import persistent_blocks
|
||||
from chia.simulator.block_tools import create_block_tools_async, test_constants
|
||||
from chia.simulator.keyring import TempKeyring
|
||||
from chia.util.keyring_wrapper import KeyringWrapper
|
||||
from tests.util.blockchain import persistent_blocks
|
||||
|
||||
|
||||
@contextmanager
|
||||
|
||||
@@ -9,11 +9,11 @@ from time import monotonic
|
||||
from typing import List, Tuple
|
||||
|
||||
from benchmarks.utils import setup_db
|
||||
from chia._tests.util.benchmarks import rand_hash, rewards
|
||||
from chia.full_node.coin_store import CoinStore
|
||||
from chia.types.blockchain_format.coin import Coin
|
||||
from chia.types.blockchain_format.sized_bytes import bytes32
|
||||
from chia.util.ints import uint32, uint64
|
||||
from tests.util.benchmarks import rand_hash, rewards
|
||||
|
||||
# to run this benchmark:
|
||||
# python -m benchmarks.coin_store
|
||||
|
||||
@@ -3,7 +3,7 @@ from __future__ import annotations
|
||||
import random
|
||||
from time import perf_counter
|
||||
|
||||
from tests.util.test_full_block_utils import get_full_blocks
|
||||
from chia._tests.util.test_full_block_utils import get_full_blocks
|
||||
|
||||
random.seed(123456789)
|
||||
|
||||
|
||||
@@ -11,11 +11,11 @@ from typing import Any, Callable, Dict, List, Optional, TextIO, Tuple, Type, Uni
|
||||
import click
|
||||
|
||||
from benchmarks.utils import EnumType, get_commit_hash
|
||||
from chia._tests.util.benchmarks import rand_bytes, rand_full_block, rand_hash
|
||||
from chia.types.blockchain_format.sized_bytes import bytes32
|
||||
from chia.types.full_block import FullBlock
|
||||
from chia.util.ints import uint8, uint64
|
||||
from chia.util.streamable import Streamable, streamable
|
||||
from tests.util.benchmarks import rand_bytes, rand_full_block, rand_hash
|
||||
|
||||
# to run this benchmark:
|
||||
# python -m benchmarks.streamable
|
||||
|
||||
@@ -12,6 +12,15 @@ import pytest
|
||||
from chia_rs import AugSchemeMPL, G2Element
|
||||
from clvm.casts import int_to_bytes
|
||||
|
||||
from chia._tests.blockchain.blockchain_test_utils import (
|
||||
_validate_and_add_block,
|
||||
_validate_and_add_block_multi_error,
|
||||
_validate_and_add_block_multi_result,
|
||||
_validate_and_add_block_no_error,
|
||||
check_block_store_invariant,
|
||||
)
|
||||
from chia._tests.conftest import ConsensusMode
|
||||
from chia._tests.util.blockchain import create_blockchain
|
||||
from chia.consensus.block_body_validation import ForkInfo
|
||||
from chia.consensus.block_header_validation import validate_finished_header_block
|
||||
from chia.consensus.block_record import BlockRecord
|
||||
@@ -53,15 +62,6 @@ from chia.wallet.puzzles.p2_delegated_puzzle_or_hidden_puzzle import (
|
||||
DEFAULT_HIDDEN_PUZZLE_HASH,
|
||||
calculate_synthetic_secret_key,
|
||||
)
|
||||
from tests.blockchain.blockchain_test_utils import (
|
||||
_validate_and_add_block,
|
||||
_validate_and_add_block_multi_error,
|
||||
_validate_and_add_block_multi_result,
|
||||
_validate_and_add_block_no_error,
|
||||
check_block_store_invariant,
|
||||
)
|
||||
from tests.conftest import ConsensusMode
|
||||
from tests.util.blockchain import create_blockchain
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
bad_element = ClassgroupElement.create(b"\x00")
|
||||
+2
-2
@@ -6,6 +6,8 @@ from typing import Tuple
|
||||
import pytest
|
||||
from clvm.casts import int_to_bytes
|
||||
|
||||
from chia._tests.blockchain.blockchain_test_utils import _validate_and_add_block
|
||||
from chia._tests.util.generator_tools_testing import run_and_get_removals_and_additions
|
||||
from chia.full_node.full_node_api import FullNodeAPI
|
||||
from chia.protocols import wallet_protocol
|
||||
from chia.server.server import ChiaServer
|
||||
@@ -18,8 +20,6 @@ from chia.types.spend_bundle import SpendBundle, estimate_fees
|
||||
from chia.util.errors import ConsensusError, Err
|
||||
from chia.util.ints import uint32, uint64
|
||||
from chia.wallet.conditions import AssertCoinAnnouncement, AssertPuzzleAnnouncement
|
||||
from tests.blockchain.blockchain_test_utils import _validate_and_add_block
|
||||
from tests.util.generator_tools_testing import run_and_get_removals_and_additions
|
||||
|
||||
BURN_PUZZLE_HASH = bytes32(b"0" * 32)
|
||||
|
||||
+1
-1
@@ -5,12 +5,12 @@ from typing import Dict, List
|
||||
|
||||
import pytest
|
||||
|
||||
from chia._tests.util.benchmarks import rand_hash
|
||||
from chia.consensus.block_record import BlockRecord
|
||||
from chia.consensus.blockchain_interface import BlockchainInterface
|
||||
from chia.consensus.find_fork_point import find_fork_point_in_chain, lookup_fork_chain
|
||||
from chia.types.blockchain_format.sized_bytes import bytes32
|
||||
from chia.util.ints import uint32
|
||||
from tests.util.benchmarks import rand_hash
|
||||
|
||||
|
||||
class DummyChain:
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Create missing `__init__.py` files in the source code folders (in "chia/" and "tests/").
|
||||
# Create missing `__init__.py` files in the source code folders (in "chia/").
|
||||
#
|
||||
# They are required by the python interpreter to properly identify modules/packages so that tools like `mypy` or an IDE
|
||||
# can work with their full capabilities.
|
||||
@@ -64,7 +64,7 @@ def command(verbose, root_str):
|
||||
stream_handler = logging.StreamHandler()
|
||||
logger.addHandler(stream_handler)
|
||||
|
||||
tree_roots = ["benchmarks", "build_scripts", "chia", "tests", "tools"]
|
||||
tree_roots = ["benchmarks", "build_scripts", "chia", "tools"]
|
||||
failed = False
|
||||
root = pathlib.Path(root_str).resolve()
|
||||
directories = [
|
||||
@@ -11,11 +11,11 @@ from typing import Any, Dict, List
|
||||
import testconfig
|
||||
|
||||
root_path = Path(__file__).parent.absolute()
|
||||
project_root_path = root_path.parent
|
||||
project_root_path = root_path.parent.parent
|
||||
|
||||
|
||||
def skip(path: Path) -> bool:
|
||||
return any(part.startswith(("_", ".")) for part in path.parts)
|
||||
return any(part.startswith(("_", ".")) and part != "_tests" for part in path.parts)
|
||||
|
||||
|
||||
def subdirs(per: str) -> List[Path]:
|
||||
@@ -113,13 +113,19 @@ pytest_monitor_enabling_paths: List[Path] = []
|
||||
for path, index in test_paths_with_index:
|
||||
if path.is_dir():
|
||||
test_files = sorted(path.glob("test_*.py"))
|
||||
test_file_paths = [file.relative_to(project_root_path) for file in test_files]
|
||||
paths_for_cli = " ".join(path.as_posix() for path in test_file_paths)
|
||||
paths_for_cli_list = [file.relative_to(project_root_path) for file in test_files]
|
||||
config_path = path
|
||||
else:
|
||||
paths_for_cli = path.relative_to(project_root_path).as_posix()
|
||||
paths_for_cli_list = [path.relative_to(project_root_path)]
|
||||
config_path = path.parent
|
||||
|
||||
def mung_path(path: Path) -> str:
|
||||
# TODO: shell escaping, but that's per platform...
|
||||
return ".".join(path.with_suffix("").parts)
|
||||
|
||||
paths_for_cli = " ".join(mung_path(path) for path in paths_for_cli_list)
|
||||
paths_for_cli = f"--pyargs {paths_for_cli}"
|
||||
|
||||
try:
|
||||
conf = update_config(module_dict(testconfig), dir_config(config_path))
|
||||
except SpecifiedDefaultsError as e:
|
||||
@@ -4,6 +4,7 @@ from typing import Iterable, List, Tuple
|
||||
|
||||
from chia_rs import AugSchemeMPL, G1Element, G2Element
|
||||
|
||||
from chia._tests.util.key_tool import KeyTool
|
||||
from chia.consensus.default_constants import DEFAULT_CONSTANTS
|
||||
from chia.types.blockchain_format.program import Program
|
||||
from chia.types.blockchain_format.sized_bytes import bytes32
|
||||
@@ -20,7 +21,6 @@ from chia.wallet.puzzles import (
|
||||
p2_puzzle_hash,
|
||||
)
|
||||
from chia.wallet.puzzles.puzzle_utils import make_create_coin_condition
|
||||
from tests.util.key_tool import KeyTool
|
||||
|
||||
from ..core.make_block_generator import int_to_public_key
|
||||
from .coin_store import CoinStore, CoinTimestamp
|
||||
@@ -5,6 +5,8 @@ from typing import List, Optional, Tuple
|
||||
import pytest
|
||||
from chia_rs import AugSchemeMPL, G1Element, G2Element, PrivateKey
|
||||
|
||||
from chia._tests.clvm.test_puzzles import public_key_for_index, secret_exponent_for_index
|
||||
from chia._tests.util.key_tool import KeyTool
|
||||
from chia.clvm.spend_sim import CostLogger, SimClient, SpendSim, sim_and_client
|
||||
from chia.consensus.default_constants import DEFAULT_CONSTANTS
|
||||
from chia.types.blockchain_format.coin import Coin
|
||||
@@ -17,8 +19,6 @@ from chia.util.errors import Err
|
||||
from chia.util.ints import uint64
|
||||
from chia.wallet.lineage_proof import LineageProof
|
||||
from chia.wallet.puzzles import p2_conditions, p2_delegated_puzzle_or_hidden_puzzle
|
||||
from tests.clvm.test_puzzles import public_key_for_index, secret_exponent_for_index
|
||||
from tests.util.key_tool import KeyTool
|
||||
|
||||
"""
|
||||
This test suite aims to test:
|
||||
@@ -9,6 +9,7 @@ from typing import Any, AsyncIterator, Dict, Iterable, List, Optional, Tuple, Ty
|
||||
from chia_rs import Coin, G2Element
|
||||
|
||||
import chia.cmds.wallet_funcs
|
||||
from chia._tests.cmds.testing_classes import create_test_block_record
|
||||
from chia.cmds.chia import cli as chia_cli
|
||||
from chia.cmds.cmds_util import _T_RpcClient, node_config_section_names
|
||||
from chia.consensus.block_record import BlockRecord
|
||||
@@ -33,7 +34,6 @@ from chia.wallet.transaction_record import TransactionRecord
|
||||
from chia.wallet.util.transaction_type import TransactionType
|
||||
from chia.wallet.util.tx_config import CoinSelectionConfig, TXConfig
|
||||
from chia.wallet.util.wallet_types import WalletType
|
||||
from tests.cmds.testing_classes import create_test_block_record
|
||||
|
||||
# Any functions that are the same for every command being tested should be below.
|
||||
# Functions that are specific to a command should be in the test file for that command.
|
||||
@@ -6,8 +6,8 @@ from typing import Iterator, Tuple
|
||||
|
||||
import pytest
|
||||
|
||||
from chia._tests.cmds.cmd_test_utils import TestRpcClients, create_service_and_wallet_client_generators
|
||||
from chia.util.config import create_default_chia_config
|
||||
from tests.cmds.cmd_test_utils import TestRpcClients, create_service_and_wallet_client_generators
|
||||
|
||||
|
||||
@pytest.fixture(scope="module") # every file has its own config generated, just to be safe
|
||||
@@ -5,9 +5,9 @@ from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
from chia._tests.util.misc import RecordingWebServer
|
||||
from chia.cmds.cmds_util import get_any_service_client
|
||||
from chia.rpc.rpc_client import ResponseFailureError, RpcClient
|
||||
from tests.util.misc import RecordingWebServer
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
@@ -6,12 +6,12 @@ from typing import Tuple
|
||||
import pytest
|
||||
from _pytest.capture import CaptureFixture
|
||||
|
||||
from chia._tests.util.time_out_assert import time_out_assert
|
||||
from chia.cmds.farm_funcs import summary
|
||||
from chia.farmer.farmer import Farmer
|
||||
from chia.harvester.harvester import Harvester
|
||||
from chia.simulator.block_tools import BlockTools
|
||||
from chia.types.aliases import FarmerService, HarvesterService, SimulatorFullNodeService, WalletService
|
||||
from tests.util.time_out_assert import time_out_assert
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
@@ -4,14 +4,14 @@ from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, List, Optional, Tuple
|
||||
|
||||
from chia._tests.cmds.cmd_test_utils import TestFullNodeRpcClient, TestRpcClients, run_cli_command_and_assert
|
||||
from chia._tests.cmds.testing_classes import hash_to_height, height_hash
|
||||
from chia._tests.util.test_full_block_utils import get_foliage, get_reward_chain_block, get_transactions_info, vdf_proof
|
||||
from chia.types.blockchain_format.foliage import FoliageTransactionBlock
|
||||
from chia.types.blockchain_format.serialized_program import SerializedProgram
|
||||
from chia.types.blockchain_format.sized_bytes import bytes32
|
||||
from chia.types.full_block import FullBlock
|
||||
from chia.util.ints import uint32, uint64
|
||||
from tests.cmds.cmd_test_utils import TestFullNodeRpcClient, TestRpcClients, run_cli_command_and_assert
|
||||
from tests.cmds.testing_classes import hash_to_height, height_hash
|
||||
from tests.util.test_full_block_utils import get_foliage, get_reward_chain_block, get_transactions_info, vdf_proof
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -5,12 +5,12 @@ from typing import List, Optional, Tuple
|
||||
|
||||
from chia_rs import Coin
|
||||
|
||||
from chia._tests.cmds.cmd_test_utils import TestRpcClients, TestWalletRpcClient, logType, run_cli_command_and_assert
|
||||
from chia._tests.cmds.wallet.test_consts import FINGERPRINT, FINGERPRINT_ARG, get_bytes32
|
||||
from chia.types.blockchain_format.sized_bytes import bytes32
|
||||
from chia.types.coin_record import CoinRecord
|
||||
from chia.util.ints import uint32, uint64
|
||||
from chia.wallet.util.tx_config import DEFAULT_TX_CONFIG, CoinSelectionConfig, TXConfig
|
||||
from tests.cmds.cmd_test_utils import TestRpcClients, TestWalletRpcClient, logType, run_cli_command_and_assert
|
||||
from tests.cmds.wallet.test_consts import FINGERPRINT, FINGERPRINT_ARG, get_bytes32
|
||||
|
||||
# Coin Commands
|
||||
|
||||
@@ -8,6 +8,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union
|
||||
import pytest
|
||||
from typing_extensions import override
|
||||
|
||||
from chia._tests.cmds.cmd_test_utils import TestRpcClients, TestWalletRpcClient, run_cli_command_and_assert
|
||||
from chia._tests.cmds.wallet.test_consts import FINGERPRINT_ARG
|
||||
from chia.types.blockchain_format.sized_bytes import bytes32
|
||||
from chia.util.bech32m import encode_puzzle_hash
|
||||
from chia.util.ints import uint8, uint32, uint64
|
||||
@@ -16,8 +18,6 @@ from chia.wallet.transaction_record import TransactionRecord
|
||||
from chia.wallet.util.transaction_type import TransactionType
|
||||
from chia.wallet.util.tx_config import TXConfig
|
||||
from chia.wallet.util.wallet_types import WalletType
|
||||
from tests.cmds.cmd_test_utils import TestRpcClients, TestWalletRpcClient, run_cli_command_and_assert
|
||||
from tests.cmds.wallet.test_consts import FINGERPRINT_ARG
|
||||
|
||||
# DAO Commands
|
||||
|
||||
@@ -3,13 +3,13 @@ from __future__ import annotations
|
||||
from pathlib import Path
|
||||
from typing import Dict, List, Optional, Tuple, Union
|
||||
|
||||
from chia._tests.cmds.cmd_test_utils import TestRpcClients, TestWalletRpcClient, logType, run_cli_command_and_assert
|
||||
from chia._tests.cmds.wallet.test_consts import FINGERPRINT_ARG, get_bytes32
|
||||
from chia.types.blockchain_format.sized_bytes import bytes48
|
||||
from chia.types.signing_mode import SigningMode
|
||||
from chia.util.bech32m import encode_puzzle_hash
|
||||
from chia.wallet.conditions import Condition, CreateCoinAnnouncement, CreatePuzzleAnnouncement
|
||||
from chia.wallet.util.tx_config import DEFAULT_TX_CONFIG, TXConfig
|
||||
from tests.cmds.cmd_test_utils import TestRpcClients, TestWalletRpcClient, logType, run_cli_command_and_assert
|
||||
from tests.cmds.wallet.test_consts import FINGERPRINT_ARG, get_bytes32
|
||||
|
||||
# DID Commands
|
||||
|
||||
@@ -3,14 +3,14 @@ from __future__ import annotations
|
||||
from pathlib import Path
|
||||
from typing import Any, List, Optional, Tuple
|
||||
|
||||
from chia._tests.cmds.cmd_test_utils import TestRpcClients, TestWalletRpcClient, logType, run_cli_command_and_assert
|
||||
from chia._tests.cmds.wallet.test_consts import FINGERPRINT, FINGERPRINT_ARG, get_bytes32
|
||||
from chia.types.blockchain_format.sized_bytes import bytes32
|
||||
from chia.types.signing_mode import SigningMode
|
||||
from chia.util.bech32m import encode_puzzle_hash
|
||||
from chia.util.ints import uint8, uint16, uint32, uint64
|
||||
from chia.wallet.nft_wallet.nft_info import NFTInfo
|
||||
from chia.wallet.util.tx_config import DEFAULT_TX_CONFIG, TXConfig
|
||||
from tests.cmds.cmd_test_utils import TestRpcClients, TestWalletRpcClient, logType, run_cli_command_and_assert
|
||||
from tests.cmds.wallet.test_consts import FINGERPRINT, FINGERPRINT_ARG, get_bytes32
|
||||
|
||||
# NFT Commands
|
||||
|
||||
+2
-2
@@ -3,14 +3,14 @@ from __future__ import annotations
|
||||
from pathlib import Path
|
||||
from typing import List, Optional, Tuple, cast
|
||||
|
||||
from chia._tests.cmds.cmd_test_utils import TestRpcClients, TestWalletRpcClient, logType, run_cli_command_and_assert
|
||||
from chia._tests.cmds.wallet.test_consts import FINGERPRINT, FINGERPRINT_ARG, get_bytes32
|
||||
from chia.rpc.wallet_request_types import GetNotifications, GetNotificationsResponse
|
||||
from chia.types.blockchain_format.sized_bytes import bytes32
|
||||
from chia.util.bech32m import encode_puzzle_hash
|
||||
from chia.util.ints import uint32, uint64
|
||||
from chia.wallet.notification_store import Notification
|
||||
from chia.wallet.transaction_record import TransactionRecord
|
||||
from tests.cmds.cmd_test_utils import TestRpcClients, TestWalletRpcClient, logType, run_cli_command_and_assert
|
||||
from tests.cmds.wallet.test_consts import FINGERPRINT, FINGERPRINT_ARG, get_bytes32
|
||||
|
||||
# Notifications Commands
|
||||
|
||||
@@ -5,14 +5,14 @@ from typing import Any, Dict, List, Optional, Tuple, cast
|
||||
|
||||
from chia_rs import Coin
|
||||
|
||||
from chia._tests.cmds.cmd_test_utils import TestRpcClients, TestWalletRpcClient, logType, run_cli_command_and_assert
|
||||
from chia._tests.cmds.wallet.test_consts import FINGERPRINT_ARG, STD_TX, get_bytes32
|
||||
from chia.types.blockchain_format.sized_bytes import bytes32
|
||||
from chia.util.bech32m import encode_puzzle_hash
|
||||
from chia.util.ints import uint32, uint64
|
||||
from chia.wallet.transaction_record import TransactionRecord
|
||||
from chia.wallet.util.tx_config import DEFAULT_TX_CONFIG, TXConfig
|
||||
from chia.wallet.vc_wallet.vc_store import VCRecord
|
||||
from tests.cmds.cmd_test_utils import TestRpcClients, TestWalletRpcClient, logType, run_cli_command_and_assert
|
||||
from tests.cmds.wallet.test_consts import FINGERPRINT_ARG, STD_TX, get_bytes32
|
||||
|
||||
# VC Commands
|
||||
|
||||
@@ -7,6 +7,17 @@ import pkg_resources
|
||||
import pytest
|
||||
from chia_rs import Coin, G2Element
|
||||
|
||||
from chia._tests.cmds.cmd_test_utils import TestRpcClients, TestWalletRpcClient, logType, run_cli_command_and_assert
|
||||
from chia._tests.cmds.wallet.test_consts import (
|
||||
CAT_FINGERPRINT_ARG,
|
||||
FINGERPRINT,
|
||||
FINGERPRINT_ARG,
|
||||
STD_TX,
|
||||
WALLET_ID,
|
||||
WALLET_ID_ARG,
|
||||
bytes32_hexstr,
|
||||
get_bytes32,
|
||||
)
|
||||
from chia.server.outbound_message import NodeType
|
||||
from chia.types.blockchain_format.program import Program
|
||||
from chia.types.blockchain_format.sized_bytes import bytes32
|
||||
@@ -25,17 +36,6 @@ from chia.wallet.util.transaction_type import TransactionType
|
||||
from chia.wallet.util.tx_config import DEFAULT_TX_CONFIG, TXConfig
|
||||
from chia.wallet.util.wallet_types import WalletType
|
||||
from chia.wallet.wallet_coin_store import GetCoinRecords
|
||||
from tests.cmds.cmd_test_utils import TestRpcClients, TestWalletRpcClient, logType, run_cli_command_and_assert
|
||||
from tests.cmds.wallet.test_consts import (
|
||||
CAT_FINGERPRINT_ARG,
|
||||
FINGERPRINT,
|
||||
FINGERPRINT_ARG,
|
||||
STD_TX,
|
||||
WALLET_ID,
|
||||
WALLET_ID_ARG,
|
||||
bytes32_hexstr,
|
||||
get_bytes32,
|
||||
)
|
||||
|
||||
test_offer_file_path: Path = Path(pkg_resources.resource_filename(__name__, "test_offer.toffer"))
|
||||
test_offer_file_name: str = str(test_offer_file_path)
|
||||
@@ -24,7 +24,22 @@ import pytest
|
||||
from _pytest.fixtures import SubRequest
|
||||
from pytest import MonkeyPatch
|
||||
|
||||
import tests
|
||||
import chia._tests
|
||||
from chia._tests import ether
|
||||
from chia._tests.core.data_layer.util import ChiaRoot
|
||||
from chia._tests.core.node_height import node_height_at_least
|
||||
from chia._tests.simulation.test_simulation import test_constants_modified
|
||||
from chia._tests.util.misc import BenchmarkRunner, GcMode, RecordingWebServer, TestId, _AssertRuntime, measure_overhead
|
||||
from chia._tests.util.setup_nodes import (
|
||||
OldSimulatorsAndWallets,
|
||||
SimulatorsAndWallets,
|
||||
setup_full_system,
|
||||
setup_n_nodes,
|
||||
setup_simulators_and_wallets,
|
||||
setup_simulators_and_wallets_service,
|
||||
setup_two_nodes,
|
||||
)
|
||||
from chia._tests.util.time_out_assert import time_out_assert
|
||||
from chia.clvm.spend_sim import CostLogger
|
||||
from chia.consensus.constants import ConsensusConstants
|
||||
from chia.full_node.full_node import FullNode
|
||||
@@ -70,30 +85,15 @@ from chia.util.task_timing import main as task_instrumentation_main
|
||||
from chia.util.task_timing import start_task_instrumentation, stop_task_instrumentation
|
||||
from chia.wallet.wallet_node import WalletNode
|
||||
from chia.wallet.wallet_node_api import WalletNodeAPI
|
||||
from tests import ether
|
||||
from tests.core.data_layer.util import ChiaRoot
|
||||
from tests.core.node_height import node_height_at_least
|
||||
from tests.simulation.test_simulation import test_constants_modified
|
||||
from tests.util.misc import BenchmarkRunner, GcMode, RecordingWebServer, TestId, _AssertRuntime, measure_overhead
|
||||
from tests.util.setup_nodes import (
|
||||
OldSimulatorsAndWallets,
|
||||
SimulatorsAndWallets,
|
||||
setup_full_system,
|
||||
setup_n_nodes,
|
||||
setup_simulators_and_wallets,
|
||||
setup_simulators_and_wallets_service,
|
||||
setup_two_nodes,
|
||||
)
|
||||
from tests.util.time_out_assert import time_out_assert
|
||||
|
||||
multiprocessing.set_start_method("spawn")
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from chia._tests.util.setup_nodes import setup_farmer_multi_harvester
|
||||
from chia.simulator.block_tools import BlockTools, create_block_tools_async, test_constants
|
||||
from chia.simulator.keyring import TempKeyring
|
||||
from chia.util.keyring_wrapper import KeyringWrapper
|
||||
from tests.util.setup_nodes import setup_farmer_multi_harvester
|
||||
|
||||
|
||||
@pytest.fixture(name="ether_setup", autouse=True)
|
||||
@@ -244,7 +244,7 @@ async def empty_blockchain(latest_db_version, blockchain_constants):
|
||||
"""
|
||||
Provides a list of 10 valid blocks, as well as a blockchain with 9 blocks added to it.
|
||||
"""
|
||||
from tests.util.blockchain import create_blockchain
|
||||
from chia._tests.util.blockchain import create_blockchain
|
||||
|
||||
async with create_blockchain(blockchain_constants, latest_db_version) as (bc1, db_wrapper):
|
||||
yield bc1
|
||||
@@ -277,7 +277,7 @@ def default_400_blocks(bt, consensus_mode):
|
||||
if consensus_mode == ConsensusMode.HARD_FORK_2_0:
|
||||
version = "_hardfork"
|
||||
|
||||
from tests.util.blockchain import persistent_blocks
|
||||
from chia._tests.util.blockchain import persistent_blocks
|
||||
|
||||
return persistent_blocks(400, f"test_blocks_400_{saved_blocks_version}{version}.db", bt, seed=b"400")
|
||||
|
||||
@@ -288,7 +288,7 @@ def default_1000_blocks(bt, consensus_mode):
|
||||
if consensus_mode == ConsensusMode.HARD_FORK_2_0:
|
||||
version = "_hardfork"
|
||||
|
||||
from tests.util.blockchain import persistent_blocks
|
||||
from chia._tests.util.blockchain import persistent_blocks
|
||||
|
||||
return persistent_blocks(1000, f"test_blocks_1000_{saved_blocks_version}{version}.db", bt, seed=b"1000")
|
||||
|
||||
@@ -299,7 +299,7 @@ def pre_genesis_empty_slots_1000_blocks(bt, consensus_mode):
|
||||
if consensus_mode == ConsensusMode.HARD_FORK_2_0:
|
||||
version = "_hardfork"
|
||||
|
||||
from tests.util.blockchain import persistent_blocks
|
||||
from chia._tests.util.blockchain import persistent_blocks
|
||||
|
||||
return persistent_blocks(
|
||||
1000,
|
||||
@@ -316,14 +316,14 @@ def default_1500_blocks(bt, consensus_mode):
|
||||
if consensus_mode == ConsensusMode.HARD_FORK_2_0:
|
||||
version = "_hardfork"
|
||||
|
||||
from tests.util.blockchain import persistent_blocks
|
||||
from chia._tests.util.blockchain import persistent_blocks
|
||||
|
||||
return persistent_blocks(1500, f"test_blocks_1500_{saved_blocks_version}{version}.db", bt, seed=b"1500")
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def default_10000_blocks(bt, consensus_mode):
|
||||
from tests.util.blockchain import persistent_blocks
|
||||
from chia._tests.util.blockchain import persistent_blocks
|
||||
|
||||
version = ""
|
||||
if consensus_mode == ConsensusMode.HARD_FORK_2_0:
|
||||
@@ -346,7 +346,7 @@ def test_long_reorg_blocks(bt, consensus_mode, default_10000_blocks):
|
||||
if consensus_mode == ConsensusMode.HARD_FORK_2_0:
|
||||
version = "_hardfork"
|
||||
|
||||
from tests.util.blockchain import persistent_blocks
|
||||
from chia._tests.util.blockchain import persistent_blocks
|
||||
|
||||
return persistent_blocks(
|
||||
4500,
|
||||
@@ -368,7 +368,7 @@ def test_long_reorg_blocks_light(bt, consensus_mode, default_10000_blocks):
|
||||
if consensus_mode == ConsensusMode.HARD_FORK_2_0:
|
||||
version = "_hardfork"
|
||||
|
||||
from tests.util.blockchain import persistent_blocks
|
||||
from chia._tests.util.blockchain import persistent_blocks
|
||||
|
||||
return persistent_blocks(
|
||||
4500,
|
||||
@@ -387,7 +387,7 @@ def default_2000_blocks_compact(bt, consensus_mode):
|
||||
if consensus_mode == ConsensusMode.HARD_FORK_2_0:
|
||||
version = "_hardfork"
|
||||
|
||||
from tests.util.blockchain import persistent_blocks
|
||||
from chia._tests.util.blockchain import persistent_blocks
|
||||
|
||||
return persistent_blocks(
|
||||
2000,
|
||||
@@ -403,7 +403,7 @@ def default_2000_blocks_compact(bt, consensus_mode):
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def default_10000_blocks_compact(bt, consensus_mode):
|
||||
from tests.util.blockchain import persistent_blocks
|
||||
from chia._tests.util.blockchain import persistent_blocks
|
||||
|
||||
version = ""
|
||||
if consensus_mode == ConsensusMode.HARD_FORK_2_0:
|
||||
@@ -10,6 +10,7 @@ from cryptography import x509
|
||||
from cryptography.hazmat.backends import default_backend
|
||||
from cryptography.hazmat.primitives import hashes, serialization
|
||||
|
||||
from chia._tests.util.time_out_assert import time_out_assert
|
||||
from chia.protocols.shared_protocol import capabilities, protocol_version
|
||||
from chia.server.outbound_message import NodeType
|
||||
from chia.server.server import ChiaServer, ssl_context_for_client
|
||||
@@ -21,7 +22,6 @@ from chia.types.peer_info import PeerInfo
|
||||
from chia.util.config import load_config
|
||||
from chia.util.ints import uint16
|
||||
from chia.util.timing import adjusted_timeout
|
||||
from tests.util.time_out_assert import time_out_assert
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
+1
-1
@@ -4,13 +4,13 @@ from typing import List
|
||||
|
||||
import pytest
|
||||
|
||||
from chia._tests.core.make_block_generator import make_block_generator
|
||||
from chia.consensus.block_creation import compute_block_cost, compute_block_fee
|
||||
from chia.consensus.condition_costs import ConditionCost
|
||||
from chia.consensus.default_constants import DEFAULT_CONSTANTS
|
||||
from chia.types.blockchain_format.coin import Coin
|
||||
from chia.types.blockchain_format.sized_bytes import bytes32
|
||||
from chia.util.ints import uint32, uint64
|
||||
from tests.core.make_block_generator import make_block_generator
|
||||
|
||||
|
||||
@pytest.mark.parametrize("add_amount", [[0], [1, 2, 3], []])
|
||||
+1
-1
@@ -7,11 +7,11 @@ from typing import Optional
|
||||
import pytest
|
||||
from chia_rs import G1Element
|
||||
|
||||
from chia._tests.util.misc import Marks, datacases
|
||||
from chia.consensus.default_constants import DEFAULT_CONSTANTS
|
||||
from chia.types.blockchain_format.proof_of_space import ProofOfSpace, passes_plot_filter, verify_and_get_quality_string
|
||||
from chia.types.blockchain_format.sized_bytes import bytes32, bytes48
|
||||
from chia.util.ints import uint8, uint32
|
||||
from tests.util.misc import Marks, datacases
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -11,6 +11,8 @@ import pytest
|
||||
from aiohttp.web_ws import WebSocketResponse
|
||||
from pytest_mock import MockerFixture
|
||||
|
||||
from chia._tests.util.misc import Marks, datacases
|
||||
from chia._tests.util.time_out_assert import time_out_assert_not_none
|
||||
from chia.daemon.client import connect_to_daemon
|
||||
from chia.daemon.keychain_server import (
|
||||
DeleteLabelRequest,
|
||||
@@ -32,8 +34,6 @@ from chia.util.keychain import Keychain, KeyData, supports_os_passphrase_storage
|
||||
from chia.util.keyring_wrapper import DEFAULT_PASSPHRASE_IF_NO_MASTER_PASSPHRASE, KeyringWrapper
|
||||
from chia.util.ws_message import create_payload, create_payload_dict
|
||||
from chia.wallet.derive_keys import master_sk_to_farmer_sk, master_sk_to_pool_sk
|
||||
from tests.util.misc import Marks, datacases
|
||||
from tests.util.time_out_assert import time_out_assert_not_none
|
||||
|
||||
chiapos_version = pkg_resources.get_distribution("chiapos").version
|
||||
|
||||
@@ -11,17 +11,17 @@ import pytest
|
||||
# https://github.com/pytest-dev/pytest/issues/7469
|
||||
from _pytest.fixtures import SubRequest
|
||||
|
||||
from chia.data_layer.data_layer_util import NodeType, Status
|
||||
from chia.data_layer.data_store import DataStore
|
||||
from chia.types.blockchain_format.sized_bytes import bytes32
|
||||
from tests.core.data_layer.util import (
|
||||
from chia._tests.core.data_layer.util import (
|
||||
ChiaRoot,
|
||||
Example,
|
||||
add_0123_example,
|
||||
add_01234567_example,
|
||||
create_valid_node_values,
|
||||
)
|
||||
from tests.util.misc import closing_chia_root_popen
|
||||
from chia._tests.util.misc import closing_chia_root_popen
|
||||
from chia.data_layer.data_layer_util import NodeType, Status
|
||||
from chia.data_layer.data_store import DataStore
|
||||
from chia.types.blockchain_format.sized_bytes import bytes32
|
||||
|
||||
# TODO: These are more general than the data layer and should either move elsewhere or
|
||||
# be replaced with an existing common approach. For now they can at least be
|
||||
+1
-1
@@ -5,7 +5,7 @@ from typing import Dict, List
|
||||
|
||||
import pytest
|
||||
|
||||
from tests.core.data_layer.util import ChiaRoot
|
||||
from chia._tests.core.data_layer.util import ChiaRoot
|
||||
|
||||
pytestmark = pytest.mark.data_layer
|
||||
|
||||
+1
-1
@@ -5,11 +5,11 @@ from typing import Any, Dict, cast
|
||||
|
||||
import pytest
|
||||
|
||||
from chia._tests.util.misc import RecordingWebServer
|
||||
from chia.data_layer.data_layer import DataLayer
|
||||
from chia.data_layer.data_layer_util import PluginRemote
|
||||
from chia.rpc.wallet_rpc_client import WalletRpcClient
|
||||
from chia.types.blockchain_format.sized_bytes import bytes32
|
||||
from tests.util.misc import RecordingWebServer
|
||||
|
||||
|
||||
async def create_sufficient_wallet_rpc_client() -> WalletRpcClient:
|
||||
+1
-1
@@ -8,6 +8,7 @@ import pytest
|
||||
# TODO: update after resolution in https://github.com/pytest-dev/pytest/issues/7469
|
||||
from _pytest.fixtures import SubRequest
|
||||
|
||||
from chia._tests.util.misc import Marks, datacases
|
||||
from chia.data_layer.data_layer_util import (
|
||||
ClearPendingRootsRequest,
|
||||
ClearPendingRootsResponse,
|
||||
@@ -19,7 +20,6 @@ from chia.data_layer.data_layer_util import (
|
||||
)
|
||||
from chia.rpc.data_layer_rpc_util import MarshallableProtocol
|
||||
from chia.types.blockchain_format.sized_bytes import bytes32
|
||||
from tests.util.misc import Marks, datacases
|
||||
|
||||
pytestmark = pytest.mark.data_layer
|
||||
|
||||
+2
-2
@@ -17,6 +17,8 @@ from typing import Any, AsyncIterator, Dict, List, Optional, Tuple, cast
|
||||
import anyio
|
||||
import pytest
|
||||
|
||||
from chia._tests.util.setup_nodes import SimulatorsAndWalletsServices
|
||||
from chia._tests.util.time_out_assert import time_out_assert
|
||||
from chia.cmds.data_funcs import (
|
||||
clear_pending_roots,
|
||||
get_keys_cmd,
|
||||
@@ -62,8 +64,6 @@ from chia.wallet.trading.offer import Offer as TradingOffer
|
||||
from chia.wallet.transaction_record import TransactionRecord
|
||||
from chia.wallet.wallet import Wallet
|
||||
from chia.wallet.wallet_node import WalletNode
|
||||
from tests.util.setup_nodes import SimulatorsAndWalletsServices
|
||||
from tests.util.time_out_assert import time_out_assert
|
||||
|
||||
pytestmark = pytest.mark.data_layer
|
||||
nodes = Tuple[WalletNode, FullNodeSimulator]
|
||||
+2
-2
@@ -14,6 +14,8 @@ from typing import Any, Awaitable, Callable, Dict, List, Optional, Set, Tuple, c
|
||||
import aiosqlite
|
||||
import pytest
|
||||
|
||||
from chia._tests.core.data_layer.util import Example, add_0123_example, add_01234567_example
|
||||
from chia._tests.util.misc import BenchmarkRunner, Marks, datacases
|
||||
from chia.data_layer.data_layer_errors import NodeHashError, TreeGenerationIncrementingError
|
||||
from chia.data_layer.data_layer_util import (
|
||||
DiffData,
|
||||
@@ -44,8 +46,6 @@ from chia.types.blockchain_format.program import Program
|
||||
from chia.types.blockchain_format.sized_bytes import bytes32
|
||||
from chia.util.byte_types import hexstr_to_bytes
|
||||
from chia.util.db_wrapper import DBWrapper2, generate_in_memory_db_uri
|
||||
from tests.core.data_layer.util import Example, add_0123_example, add_01234567_example
|
||||
from tests.util.misc import BenchmarkRunner, Marks, datacases
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
+1
-1
@@ -5,10 +5,10 @@ from typing import Any, Dict
|
||||
|
||||
import pytest
|
||||
|
||||
from chia._tests.core.data_layer.util import add_01234567_example, create_valid_node_values
|
||||
from chia.data_layer.data_layer_util import NodeType, Side, Status
|
||||
from chia.data_layer.data_store import DataStore
|
||||
from chia.types.blockchain_format.sized_bytes import bytes32
|
||||
from tests.core.data_layer.util import add_01234567_example, create_valid_node_values
|
||||
|
||||
pytestmark = pytest.mark.data_layer
|
||||
|
||||
@@ -5,15 +5,20 @@ from typing import Any, Coroutine, Optional, TypeVar
|
||||
|
||||
import pytest
|
||||
|
||||
from chia._tests.conftest import FarmerOneHarvester
|
||||
from chia._tests.connection_utils import add_dummy_connection, add_dummy_connection_wsc
|
||||
from chia._tests.util.network_protocol_data import (
|
||||
new_signage_point,
|
||||
request_signed_values,
|
||||
respond_signatures,
|
||||
signed_values,
|
||||
)
|
||||
from chia.farmer.farmer_api import FarmerAPI
|
||||
from chia.protocols import farmer_protocol
|
||||
from chia.protocols.protocol_message_types import ProtocolMessageTypes
|
||||
from chia.server.outbound_message import Message, NodeType
|
||||
from chia.util.hash import std_hash
|
||||
from chia.util.ints import uint8, uint32, uint64
|
||||
from tests.conftest import FarmerOneHarvester
|
||||
from tests.connection_utils import add_dummy_connection, add_dummy_connection_wsc
|
||||
from tests.util.network_protocol_data import new_signage_point, request_signed_values, respond_signatures, signed_values
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user