Skip to content

Rename test files for consistency #760

@exploreriii

Description

@exploreriii

🐣 Good First Issue: Standardize Test File Naming

This issue is reserved for people who have never or only recently contributed to Hiero
or any open source project in general.
We know that creating a pull request (PR) can be a major barrier for new contributors.
The goal of this issue and all other issues labeled 'good first issue'
is to help you make your first contribution to Hiero.

👾 Problem

Some of our test files currently use inconsistent naming patterns:

Unit tests: some files start with test_ (e.g., test_my_account.py) and some end with _test (e.g., my_account_test.py).

Integration tests: almost all use the _test postfix (e.g., account_allowance_e2e_test.py).

This inconsistency makes it harder to write a workflow that enforces test file naming, and leads to extra complexity in CI.

💡 Solution

We should standardize all test files in tests/unit and tests/integration to use the _test.py postfix.

Current name New name
test_account_allowance_approve_transaction.py account_allowance_approve_transaction_test.py
test_my_account.py my_account_test.py

Please skip renaming the following helper/config files:

init.py

conftest.py

mock_server.py

utils_for_test.py

💡 Implementation Steps

  • Rename unit test files in tests/unit to follow the _test.py postfix convention.

  • Rename integration test files in tests/integration to follow the _test.py postfix convention (if not already).

  • Make sure the test imports still work after renaming.

  • Verify that all tests still run and pass after renaming.

👩‍💻 Requirements to Pass

  • All tests run successfully after renaming.

  • Each commit is GPG and DCO signed: git commit -S -s -m "..."

(See docs/sdk_developers/signing.md
)

  • Add a changelog entry in UNRELEASED:
    (See docs/sdk_developers/changelog_entry.md
    )

📝 Next Steps

  • Comment below that you’d like to work on this issue.

  • Wait to be assigned by a maintainer.

  • Fork the repository and follow the instructions in CONTRIBUTING.md
    to start making your changes.

  • Use the README.md
    for guidance on running tests locally.

Thank you for helping make Hiero more consistent and maintainable! 🛠️

Metadata

Metadata

Assignees

Labels

Good First IssueIssues which are ideal for a first time or new project contributor.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions