Skip to content

Commit

Permalink
[UnitTests] Update/add tests related to electrochemistry
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl committed Mar 14, 2022
1 parent 5d4f46f commit a00e4bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions interfaces/cython/cantera/test/test_reaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -1816,6 +1816,13 @@ def test_rate(self):
pytest.skip("Legacy: interface rate does not include coverage terms")
super().test_rate()

def test_electrochemistry(self):
if self._legacy:
pytest.skip("Legacy: property uses_electrochemisty not implemented")
rxn = self.from_yaml()
assert not rxn.rate.uses_electrochemistry
assert np.isnan(rxn.rate.beta)


class TestArrheniusInterfaceReaction(InterfaceReactionTests, utilities.CanteraTest):
# test interface reaction without coverages
Expand Down
2 changes: 1 addition & 1 deletion test/kinetics/kineticsFromYaml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ TEST_F(ReactionToYaml, electrochemical)
oxide_surf->thermo()->setElectricPotential(-3.4);
ox_surf->setCoveragesByName("O''(ox):0.2, OH'(ox):0.3, H2O(ox):0.5");
duplicateReaction(0);
EXPECT_TRUE(std::dynamic_pointer_cast<ElectrochemicalReaction2>(duplicate));
EXPECT_TRUE(std::dynamic_pointer_cast<InterfaceArrheniusRate>(duplicate->rate()));
compareReactions();
compareReactions();
}
Expand Down

0 comments on commit a00e4bb

Please sign in to comment.