Skip to content

tests(nano): add missing tests for rng immutability#1343

Merged
glevco merged 1 commit intomasterfrom
tests/nano/rng-immutability
Aug 7, 2025
Merged

tests(nano): add missing tests for rng immutability#1343
glevco merged 1 commit intomasterfrom
tests/nano/rng-immutability

Conversation

@glevco
Copy link
Contributor

@glevco glevco commented Aug 1, 2025

Motivation

Current mutability tests on NanoRNG are incomplete, this PR adds the missing ones. And it also simplifies the frozen implementation.

Acceptance Criteria

  • Remove NanoRNG.__frozen attribute, to simplify the __setattr__ override.
  • Add missing tests on test_rng_override:
    • Updating an existing instance attribute — this highlights that the current solution doesn't protect against object.__setattr__.
    • Creating a new instance attribute.
    • Creating a class instance attribute.

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@glevco glevco self-assigned this Aug 1, 2025
@glevco glevco moved this from Todo to In Progress (WIP) in Hathor Network Aug 1, 2025
@codecov
Copy link

codecov bot commented Aug 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (master@cb3772e). Learn more about missing BASE report.
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1343   +/-   ##
=========================================
  Coverage          ?   85.59%           
=========================================
  Files             ?      425           
  Lines             ?    32216           
  Branches          ?     5015           
=========================================
  Hits              ?    27574           
  Misses            ?     3625           
  Partials          ?     1017           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@glevco glevco force-pushed the tests/nano/rng-immutability branch from e1b4afd to 5a8b68a Compare August 1, 2025 03:05
@jansegre jansegre force-pushed the tests/check-mutable-properties branch 4 times, most recently from cda71d0 to eb64e24 Compare August 1, 2025 15:06
@glevco glevco force-pushed the tests/nano/rng-immutability branch from 5a8b68a to da9997c Compare August 1, 2025 16:49
@glevco glevco moved this from In Progress (WIP) to In Progress (Done) in Hathor Network Aug 1, 2025
@jansegre jansegre deleted the branch master August 1, 2025 23:24
@jansegre jansegre closed this Aug 1, 2025
@github-project-automation github-project-automation bot moved this from In Progress (Done) to Waiting to be deployed in Hathor Network Aug 1, 2025
@glevco glevco reopened this Aug 4, 2025
@glevco glevco changed the base branch from tests/check-mutable-properties to master August 4, 2025 16:43
@glevco glevco moved this from Waiting to be deployed to In Progress (Done) in Hathor Network Aug 4, 2025
@glevco glevco force-pushed the tests/nano/rng-immutability branch from da9997c to e6bd55f Compare August 4, 2025 17:24
@github-actions
Copy link

github-actions bot commented Aug 4, 2025

🐰 Bencher Report

Branchtests/nano/rng-immutability
Testbedubuntu-22.04
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
minutes (m)
(Result Δ%)
Lower Boundary
minutes (m)
(Limit %)
Upper Boundary
minutes (m)
(Limit %)
sync-v2 (up to 20000 blocks)📈 view plot
🚷 view threshold
1.68 m
(+2.30%)Baseline: 1.64 m
1.48 m
(87.98%)
1.81 m
(93.00%)
🐰 View full continuous benchmarking report in Bencher

@glevco glevco force-pushed the tests/nano/rng-immutability branch 2 times, most recently from 3271779 to 649998b Compare August 5, 2025 19:05
@msbrogli msbrogli moved this from In Progress (Done) to In Review (WIP) in Hathor Network Aug 6, 2025
@glevco glevco force-pushed the tests/nano/rng-immutability branch from 649998b to c98f01f Compare August 6, 2025 20:15
@glevco glevco moved this from In Review (WIP) to In Review (Done) in Hathor Network Aug 6, 2025
@glevco glevco force-pushed the tests/nano/rng-immutability branch from c98f01f to 8cf3ed3 Compare August 7, 2025 00:21
@glevco glevco merged commit 0d69f48 into master Aug 7, 2025
8 checks passed
@glevco glevco deleted the tests/nano/rng-immutability branch August 7, 2025 00:59
@github-project-automation github-project-automation bot moved this from In Review (Done) to Waiting to be deployed in Hathor Network Aug 7, 2025
@jansegre jansegre moved this from Waiting to be deployed to Done in Hathor Network Aug 7, 2025
This was referenced Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants