Skip to content
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,32 @@ jobs:
echo "FAIL: No line-level changes detected in CHANGELOG.md."
exit 1
fi

test-name-check:
name: Test File Naming Check
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
with:
egress-policy: audit

- name: Checkout repository
uses: actions/checkout@v4

- name: Validate test file naming convention
run: |
echo "Checking for test files that don't end with _test.py..."
Copy link
Contributor

Choose a reason for hiding this comment

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

only the integration tests end with test
the unit tests start with test

invalid_tests=$(find tests -type f -name "*.py" ! -name "*_test.py" || true)

if [ -n "$invalid_tests" ]; then
echo "The following test files don't follow the naming convention (*_test.py):"
echo "$invalid_tests"
echo ""
echo "Please rename them to end with *_test.py so CI can detect and run them."
exit 1
else
echo "All test files follow *_test.py naming convention."
fi
4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
## [Unreleased]

### Added
- Added CI check in `.github/workflows/pr-checks.yml` to ensure all test files follow the naming convention `*_test.py`.This prevents untracked or skipped tests from being missed during CI runs.
- Add `TokenFeeScheduleUpdateTransaction` class to support updating custom fee schedules on tokens (#471).
- Add `examples/token_update_fee_schedule_fungible.py` and `examples/token_update_fee_schedule_nft.py` demonstrating the use of `TokenFeeScheduleUpdateTransaction`.
- Update `docs/sdk_users/running_examples.md` to include `TokenFeeScheduleUpdateTransaction`.
Expand Down Expand Up @@ -83,7 +84,6 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
- docs: workflow.md documenting key steps to creating a pull request (#605)
- Added `docs/discord.md` explaining how to join and navigate the Hiero community Discord (#614).


### Changed

- Added direct links to Python SDK channel in Linux Foundation Decentralized Trust Discord back in
Expand Down Expand Up @@ -156,8 +156,6 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
- Improved `CONTRIBUTING.md` by explaining the /docs folder structure and fixing broken hyperlinks.(#431)
- Converted class in `token_nft_info.py` to dataclass for simplicity.



### Fixed

- Incompatible Types assignment in token_transfer_list.py
Expand Down
14 changes: 14 additions & 0 deletions tests/integration/account_balance_query_e2e.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import pytest

from hiero_sdk_python.query.account_balance_query import CryptoGetAccountBalanceQuery
from tests.integration.utils_for_test import IntegrationTestEnv


@pytest.mark.integration
def test_integration_account_balance_query_can_execute():
env = IntegrationTestEnv()

try:
CryptoGetAccountBalanceQuery(account_id=env.operator_id).execute(env.client)
finally:
env.close()
18 changes: 18 additions & 0 deletions tests/unit/supply_type_badname.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import pytest
from hiero_sdk_python.tokens.supply_type import SupplyType

pytestmark = pytest.mark.unit

def test_members():
assert SupplyType.INFINITE.value == 0
assert SupplyType.FINITE.value == 1

def test_name():
assert SupplyType.INFINITE.name == "INFINITE"
assert SupplyType.FINITE.name == "FINITE"

def test_supply_type_enum_members():
members = list(SupplyType)
assert len(members) == 2
assert SupplyType.INFINITE in members
assert SupplyType.FINITE in members