You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[UNEXPECTED BEHAVIOR] ADC _high_cost tests fail when run standalone #3648
Describe the unexpected behavior
Several _high_cost tests in pyscf/adc/test/test_uadc/ don't set myadc.method_type themselves. They pass in full-file runs only because unittest executes methods alphabetically and a low-cost sibling (test_ee_adc2) happens to run first and set myadc.method_type = "ee" on the shared module-level ADC object. When the low-cost tests are filtered out (-k), the high-cost EE tests run with the "ip" default and produce garbage.
Repro:
# Whole file: passes (test_ee_adc2 sets method_type="ee" first)
python -m pytest pyscf/adc/test/test_uadc/test_ee_F2.py
# -> 4 passed
# Only the high-cost test: the low-cost setter is deselected
python -m pytest pyscf/adc/test/test_uadc/test_ee_F2.py -k "high_cost"
# -> 1 failed
# E AssertionError: 0.5085705788015883 != 0.3884663487 within 6 places
Activity