ansys / ansys/pyansys-tools-variableinterop

Update ToIntegerArrayVisitor tests with scalar conversion methods

Open
#31 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Description

It does not mean -0.1 rounds to -1.
The strategy of rounding to the nearest number, and when a number is halfway between two others, it's rounded toward the nearest number that's away from zero.
0.45 -> 0.5
0.5 -> 1.0
-0.45 -> -0.5
-0.5 -> -1

_Originally posted by @mobigliani in https://github.com/pyansys/ansys-common-variableinterop/pull/29#discussion_r848440651_

Contributor guide

Open the contributing guide

Research direction

Locate the tests for ToIntegerArrayVisitor and read the existing scalar conversion cases first. Add coverage for the documented rounding examples, including positive and negative halfway values, then run the relevant test suite to confirm the expected conversions.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.