Bug
tests/test_weather.py contains two test functions - get_u and get_v - that pytest never collects or executes, providing zero coverage for WeatherCond.get_u() and WeatherCond.get_v().
Root cause (5 compounding defects)
- Missing
test_ prefix - pytest never discovers get_u / get_v
- Parameter count mismatch -
@parametrize declares 3 params, function signatures accept 2; would crash if collected
- Self-referential assertions -
assert u_test == pytest.approx(u_test) always passes regardless of correctness
- Wrong expected values- e.g.
get_u(45, 1) expects -1, actual is -sin(45°) = -0.7071…
- Copy-paste error -
get_v's parametrize string names the third param u_res instead of v_res
Impact
WeatherCond.get_u() and get_u.get_v() are used in production (apply_get_gauß). Any regression in wind-component decomposition goes completely undetected.
Expected behaviour
Both functions should be collected and executed by pytest with correct expected values.
Bug
tests/test_weather.pycontains two test functions -get_uandget_v- that pytest never collects or executes, providing zero coverage forWeatherCond.get_u()andWeatherCond.get_v().Root cause (5 compounding defects)
test_prefix - pytest never discoversget_u/get_v@parametrizedeclares 3 params, function signatures accept 2; would crash if collectedassert u_test == pytest.approx(u_test)always passes regardless of correctnessget_u(45, 1)expects-1, actual is-sin(45°) = -0.7071…get_v's parametrize string names the third paramu_resinstead ofv_resImpact
WeatherCond.get_u()andget_u.get_v()are used in production (apply_get_gauß). Any regression in wind-component decomposition goes completely undetected.Expected behaviour
Both functions should be collected and executed by pytest with correct expected values.