Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structure improvement functional tests #309

Merged
merged 3 commits into from
Dec 27, 2024
Merged

Conversation

qlrd
Copy link
Contributor

@qlrd qlrd commented Dec 17, 2024

What is the purpose of this pull request?

In summary, create a python structure with a pyproject.toml file to:

  • isolate possible python environments with poetry and its dependencies;
  • structures the format procedure for python code with black;
  • structures the lint procedure for python code with pylint;
  • structures the organization of automated tasks with poethepoet (allowing better management for when function tests increase).

@qlrd qlrd mentioned this pull request Dec 17, 2024
Copy link
Collaborator

@Davidson-Souza Davidson-Souza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks great, I successfully ran things locally! Just some minor comments, mostly documentation spell

README.md Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
@Davidson-Souza Davidson-Souza added dependencies Pull requests that update a dependency file code quality Generally improves code readability and maintainability functional tests labels Dec 17, 2024
@Davidson-Souza Davidson-Souza added this to the v0.8.0 milestone Dec 17, 2024
@qlrd
Copy link
Contributor Author

qlrd commented Dec 18, 2024

Like suggested by @jaoleal, started to lint some codes (added some docstrings and did some changes on relevant warnings that the linter has accused).

@jaoleal
Copy link
Contributor

jaoleal commented Dec 18, 2024

Nice, when the work is complete, could you squash all the commits into expressive one(s) ?

Copy link
Collaborator

@Davidson-Souza Davidson-Souza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK b18ff29

Just squash the commits as @jaoleal suggested.

@qlrd qlrd force-pushed the master branch 3 times, most recently from 29a3958 to 10ca7d5 Compare December 21, 2024 14:21
@qlrd
Copy link
Contributor Author

qlrd commented Dec 22, 2024

Changed a little of code in test_framework.py (and example_test.py and restart.py) at
2f5ccf8 to follow some principles in BitcoinCore functional tests (and to make it more flexible). Should i wait for some review before squash it?

@Davidson-Souza
Copy link
Collaborator

@qlrd I think you can squash now, and I'll make a full review.

Also, this needs rebase

@qlrd
Copy link
Contributor Author

qlrd commented Dec 26, 2024

@jaoleal, @Davidson-Souza i think it's done

@Davidson-Souza
Copy link
Collaborator

@qlrd you have a conflict with tests/example_test.py. A rebase should fix it

qlrd added 3 commits December 26, 2024 18:27
…ition made on issue#252

defined python 3.12 as minimum version for functional tests
changed example_test I: added assertions at run_test

changed example_test II: added set_params method

changed restart: applied the main call at the end of file

changed run_tests: flexibilized it for individual tests

modified pyproject.toml I: added individual test tasks (example-test, restart-test)

modified pyproject.toml II: defined tests task as a sequence of individual tests

linted tests/tests_framework/{utreexod, floresta_rpc, test_framework, secp256k1, electrum_client, mock_rpc, key, bitcoin}.py

changed floresta_rpc I: diminished the number of arguments of FlorestaRPC

changed floresta_rpc II: created a default value REGTEST_RPC_SERVER

changed test_framework I: create class FlorestaTestMetaClass

changed test_framework II: renamed the class as FlorestaTestFramework

changed test_framework III: modified run_node method due to changes on tests/tests_framework/floresta.py

changed test_framework IV: added methods (set_test_params, add_node_settings, get_node_settings)

changed secp256k1 I: disabled linter on some lines

changed secp256k1 II: moved to tests/test_framework/crypto to comply with definition of modules in key.py

changed bitcoin I: added methods (dsha256, read_compact_size method, get_merkle_root method, Transaction.deserialize)

changed bitcoin II: modified Block.get_merkle_root
@Davidson-Souza
Copy link
Collaborator

ACK 3fdb8c0

@Davidson-Souza Davidson-Souza merged commit 508fb8c into vinteumorg:master Dec 27, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Generally improves code readability and maintainability dependencies Pull requests that update a dependency file functional tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants