Skip to content

Python variable scoping issue when testing "Gradle" #2635

@simplyNour

Description

@simplyNour

Installation method

PyPI (via pip)

Package version

v0.16.0

Description

Problem Description

when running poetry run pytest -rA -m validate_targets -n 20 --chunked-sites "Gradle, the test for F+ fails due to an unbound local variable error messing up with the test accuracy.
This is undesirable because the failure is due to a python variable scoping issue rather than an actual F+ behavior from the Gradle website.

Solution

Code-related: Mark upper_bound variable as nonlocal.
CI/CD: Extend the test results reporter workflow to distinguish exit code 1 marking test failure from exit code 2 marking a python raised exception.

Steps to reproduce

  1. Run poetry run pytest -rA -m validate_targets -n 20 --chunked-sites "Gradle"
  2. Watch Test_All_Targets::test_false_pos[Gradle] - UnboundLocalError: cannot access local variable 'upper_bound' where it is not associated with a value

Additional information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions