radiasoft / rslaser_old

Integrated modeling of CPA crystal-based laser amplifiers
Apache License 2.0
1 stars 1 forks source link

Fix #95: fix evelope pulse tests #98

Closed gurhar1133 closed 1 year ago

gurhar1133 commented 1 year ago

Fixed tests and did a little cleanup

Changed the cavity test to use ndiff instead of float comparison

Envelope tests are fixed, but still dont pass, this is because the LaserPulseEnvelope class needs to be updated to reflect the removal of the 'z_waist' class.

bnash commented 1 year ago

I switched to the branch and ran pytest from the top director. I got the following errors: ../../.pyenv/versions/3.7.2/lib/python3.7/subprocess.py:1522: FileNotFoundError ======================================================== short test summary info ======================================================== FAILED tests/envelope_test.py::test_instantiation - AttributeError: 'PKDict' object has no attribute 'z_waist' FAILED tests/envelope_test.py::test_eval_ex - AttributeError: 'PKDict' object has no attribute 'z_waist' FAILED tests/pulse_test.py::test_cavity_propagation - FileNotFoundError: [Errno 2] No such file or directory: 'ndiff': 'ndiff' FAILED tests/wavefront_sensor_test.py::test_propagation01 - FileNotFoundError: [Errno 2] No such file or directory: 'ndiff': 'ndiff' ===================================================== 4 failed, 15 passed in 59.38s =====================================================

Is this what we expect?

gurhar1133 commented 1 year ago

I switched to the branch and ran pytest from the top director. I got the following errors: ../../.pyenv/versions/3.7.2/lib/python3.7/subprocess.py:1522: FileNotFoundError ======================================================== short test summary info ======================================================== FAILED tests/envelope_test.py::test_instantiation - AttributeError: 'PKDict' object has no attribute 'z_waist' FAILED tests/envelope_test.py::test_eval_ex - AttributeError: 'PKDict' object has no attribute 'z_waist' FAILED tests/pulse_test.py::test_cavity_propagation - FileNotFoundError: [Errno 2] No such file or directory: 'ndiff': 'ndiff' FAILED tests/wavefront_sensor_test.py::test_propagation01 - FileNotFoundError: [Errno 2] No such file or directory: 'ndiff': 'ndiff' ===================================================== 4 failed, 15 passed in 59.38s =====================================================

Is this what we expect?

Yes, the ndiff installer is still in progress, so those are expected errors.