Fix small typo/misleading var name in wrapper output dims calculator test

Open Beginner friendly
#410 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
68/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
testing-qa

Research direction

Open tests/method_wrappers/test_generic.py and inspect test_generic_calculate_output_dims, especially the patched calculate_output_dims() call around lines 600–602. Rename the misleading memcalc_mock variable to a name matching the output-dimensions calculator, then run the relevant test to confirm it still passes.

Written by the indexing model from the issue text.

Description

minor

The calculation of the output dims is being tested in this particular test called test_generic_calculate_output_dims.

During the test, the calculate_output_dims() method on a query object is patched: https://github.com/DiamondLightSource/httomo/blob/f7f4d96508b5e757a42f22bc10e93bec319854a9/tests/method_wrappers/test_generic.py#L600-L602

However, the name of the variable memcalc_mock suggests that the method on the query object being patched is the memory calculator method (ie, calculate_max_slices()), which isn't the case.

This variable name is likely a typo, but is misleading, so should be changed to something like output_dims_calc_mock to avoid confusion.

Dominant language
Python
Stars
10
Forks
5
Avg merge
5d 17h
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DiamondLightSource/httomo

All issues in DiamondLightSource/httomo

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.