Skip to content

Commit

Permalink
add test plot equations
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoMVale committed Oct 13, 2023
1 parent ce7fc9a commit 1c70d26
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/physprops/test_equations.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from polykin.physprops.dippr import \
DIPPR100, DIPPR101, DIPPR102, DIPPR104, DIPPR105, DIPPR106
from polykin.physprops import Antoine, Wagner
from polykin import plotequations

import pytest
import numpy as np
Expand Down Expand Up @@ -63,7 +64,7 @@ def test_Antoine(Pvap_water):
assert np.isclose(Pvap_water(100., 'C'), 1.01325, rtol=2e-2)


def test_fit_Antoine(Pvap_water):
def test_Antoine_fit(Pvap_water):
T = np.linspace(260, 373, 50)
Y = Pvap_water(T)
p = Antoine(A=1, B=1, C=1, unit='bar')
Expand All @@ -84,3 +85,11 @@ def test_Wagner():
d=-2.128615,
Tmin=273., Tmax=647., unit='bar')
assert np.isclose(p(100., 'C'), 1.01325, rtol=2e-2)

# %% plot


def test_plotequations(Pvap_water):
for kind in ['linear', 'semilogy', 'Arrhenius']:
fig = plotequations([Pvap_water], kind=kind)
assert fig is not None

0 comments on commit 1c70d26

Please sign in to comment.