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
Dear authors,
I ran the tests in the repository using pytest and it looks like there is an issue with a test failing. Perhaps a good idea to add automated testing using Github CI / Github Actions? I have pasted in the output below:
self = <tests.test_experiment.TestLowCapacity object at 0x117c58cd0>
capsys = <_pytest.capture.CaptureFixture object at 0x117ccced0>
def test_cc(self, capsys):
deg = ChemicalDegradationReduced(rate_order=2, rate_constant=10)
cell = ZeroDModel(volume_cls=0.005, # L
volume_ncls=0.03, # L
c_ox_cls=0.01, # M
c_red_cls=0.01, # M
c_ox_ncls=0.01, # M
c_red_ncls=0.01, # M
ocv_50_soc=0.0, # V
resistance=0.8, # ohms
k_0_cls=1e-3, # cm/s
k_0_ncls=1e-3, # cm/s
)
protocol = ConstantCurrent(voltage_limit_charge=0.2, # V
voltage_limit_discharge=-0.2, # V
current=0.05, # A
)
all_results = protocol.run(cell_model=cell,
duration=1000, # cycle time to simulate (s)
degradation=deg,
)
warn_out = "capacity is less than 1% of initial CLS capacity."
captured = capsys.readouterr()
cyclestatus = captured.out.strip().rsplit('time steps: ', 1)[1]
assert cyclestatus == warn_out
E AssertionError: assert 'CyclingStatus.LOW_CAPACITY.' == 'capacity is ...CLS capacity.'
E - capacity is less than 1% of initial CLS capacity.
E + CyclingStatus.LOW_CAPACITY.
tests/test_experiment.py:536: AssertionError
=========================== short test summary info ============================
FAILED tests/test_experiment.py::TestLowCapacity::test_cc - AssertionError: assert 'CyclingStatus.LOW_CAPACITY.' == 'capacity is ...CLS...
======================== 1 failed, 72 passed in 27.35s =========================
The text was updated successfully, but these errors were encountered:
Thank you for raising this! This was due to a CPython 3.11+ issue where the behavior of str/Enum mixins was changed.
We have GitHub actions that run the tests on each pull request, but previously only Python 3.10 was used so this went unnoticed.
This is now fixed in #42, and the GitHub actions have been updated to run the tests with multiple Python versions.
Dear authors,
I ran the tests in the repository using pytest and it looks like there is an issue with a test failing. Perhaps a good idea to add automated testing using Github CI / Github Actions? I have pasted in the output below:
(base) ➜ rfbzero git:(main) pytest tests/
============================= test session starts ==============================
platform darwin -- Python 3.11.8, pytest-7.4.0, pluggy-1.0.0
rootdir: /Users/johh/github/rfbzero
configfile: pyproject.toml
plugins: anyio-4.2.0
collected 73 items
tests/test_crossover.py .. [ 2%]
tests/test_degradation.py ......................... [ 36%]
tests/test_experiment.py .......F.......... [ 61%]
tests/test_redox_flow_cell.py ............................ [100%]
=================================== FAILURES ===================================
___________________________ TestLowCapacity.test_cc ____________________________
self = <tests.test_experiment.TestLowCapacity object at 0x117c58cd0>
capsys = <_pytest.capture.CaptureFixture object at 0x117ccced0>
E AssertionError: assert 'CyclingStatus.LOW_CAPACITY.' == 'capacity is ...CLS capacity.'
E - capacity is less than 1% of initial CLS capacity.
E + CyclingStatus.LOW_CAPACITY.
tests/test_experiment.py:536: AssertionError
=========================== short test summary info ============================
FAILED tests/test_experiment.py::TestLowCapacity::test_cc - AssertionError: assert 'CyclingStatus.LOW_CAPACITY.' == 'capacity is ...CLS...
======================== 1 failed, 72 passed in 27.35s =========================
The text was updated successfully, but these errors were encountered: