text
stringlengths
0
251
E TypeError: list indices must be integers or slices, not str
/verifier/test_outputs.py:64: TypeError
_ ERROR at setup of test_hidden_multilayer_replay_changes_resonances_and_packets _
@pytest.fixture(scope="session")
def resonance_output():
> return read_json(RESULTS / "resonances.json")["resonances"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E TypeError: list indices must be integers or slices, not str
/verifier/test_outputs.py:64: TypeError
=================================== FAILURES ===================================
________________ test_artifact_schema_and_submission_integrity _________________
instance = {'constants': {'hbar2_over_2m0_eV_nm2': 0.0380998212, 'hbar_eV_fs': 0.6582119569}, 'energy_window_eV': [0.025, 0.18], ...th_nm': 4.4}, {'effective_mass_m0': 0.094, 'name': 'collector_barrier', 'potential_eV': 0.325, 'width_nm': 2.35}], ...}
def test_artifact_schema_and_submission_integrity(instance):
assert SOLVER.is_file() and not SOLVER.is_symlink()
assert SOLVER.stat().st_size > 5000
expected_files = {
"summary.json",
"scattering_grid.csv",
"resonances.json",
"wigner_smith.csv",
"wavepackets.json",
"solver_diagnostics.json",
"report.md",
*{f"wavepacket_trace_{packet['packet_id']}.csv" for packet in instance["wavepackets"]},
}
actual_files = {path.name for path in RESULTS.iterdir() if path.is_file()}
assert actual_files == expected_files
assert not any(path.is_symlink() for path in RESULTS.rglob("*"))
summary = read_json(RESULTS / "summary.json")
assert summary["schema_version"] == "1.0"
assert summary["resonance_count"] == instance["expected_resonance_count"]
> assert summary["wavepacket_count"] == len(instance["wavepackets"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^
E KeyError: 'wavepacket_count'
/verifier/test_outputs.py:446: KeyError
_________ test_scattering_grid_matches_independent_interface_solution __________
instance = {'constants': {'hbar2_over_2m0_eV_nm2': 0.0380998212, 'hbar_eV_fs': 0.6582119569}, 'energy_window_eV': [0.025, 0.18], ...th_nm': 4.4}, {'effective_mass_m0': 0.094, 'name': 'collector_barrier', 'potential_eV': 0.325, 'width_nm': 2.35}], ...}
def test_scattering_grid_matches_independent_interface_solution(instance):
rows = read_csv(RESULTS / "scattering_grid.csv")
assert len(rows) == int(instance["resonance_search"]["output_points"])
energies = np.array([as_float(row, "energy_eV") for row in rows])
expected_energies = np.linspace(*map(float, instance["energy_window_eV"]), len(rows))
assert np.max(abs(energies - expected_energies)) < 2.0e-13
for index in np.linspace(0, len(rows) - 1, 13, dtype=int):
row = rows[index]
direct = direct_scattering(energies[index], instance)
submitted = np.array(
[
[
> as_float(row, "r_left_real") + 1.0j * as_float(row, "r_left_imag"),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
as_float(row, "t_right_real") + 1.0j * as_float(row, "t_right_imag"),
],
[
as_float(row, "t_left_real") + 1.0j * as_float(row, "t_left_imag"),
as_float(row, "r_right_real") + 1.0j * as_float(row, "r_right_imag"),
],
]
)
/verifier/test_outputs.py:471:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
row = {'S11_imag': '-6.764003236643e-01', 'S11_real': '-7.364750419087e-01', 'S12_imag': '-7.077207797038e-03', 'S12_real': '6.085057286344e-03', ...}
key = 'r_left_real'
def as_float(row, key):
> value = float(row[key])
^^^^^^^^
E KeyError: 'r_left_real'
/verifier/test_outputs.py:52: KeyError
==================================== PASSES ====================================
=========================== short test summary info ============================
PASSED ::test_malformed_instance_fails_closed
ERROR ::test_resonance_linewidths_and_complex_poles - TypeError: list indices...
ERROR ::test_wigner_smith_delays_and_trace_identity - TypeError: list indices...
ERROR ::test_detector_current_wavepackets_close_and_reproduce_phase_delay - T...
ERROR ::test_hidden_multilayer_replay_changes_resonances_and_packets - TypeEr...
FAILED ::test_artifact_schema_and_submission_integrity - KeyError: 'wavepacke...
FAILED ::test_scattering_grid_matches_independent_interface_solution - KeyErr...
==================== 2 failed, 1 passed, 4 errors in 1.85s =====================