Skip to content

Conversation

@uh-oh-monteiro
Copy link

set name of dynamically created PhaseDescriptors. Useful for when you're creating a phase descriptor like so:

def make_custom_test(params: Params) -> htf.PhaseDescriptor:
    @htf.measures(htf.Measurement(f'MEASUREMENT-{params.param}'))
    @htf.plug(plug=somePlug)
    def phase(test: htf.TestApi, plug: somePlug):
        plug.do_something
        test.measurements[f'MEASUREMENT-{params.param}']
    phase.name = f'TESTING-{params.some_param}'
    return phase

PhaseDescriptors don't have a __name__ attribute like normal functions, and the name attribute only had a getter.

@uh-oh-monteiro uh-oh-monteiro changed the base branch from master to halter-mods November 4, 2025 02:47
@coveralls
Copy link

Pull Request Test Coverage Report for Build 19056130252

Details

  • 2 of 3 (66.67%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 61.529%

Changes Missing Coverage Covered Lines Changed/Added Lines %
openhtf/core/phase_descriptor.py 2 3 66.67%
Totals Coverage Status
Change from base Build 17748747896: 0.002%
Covered Lines: 4691
Relevant Lines: 7624

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants