Skip to content

Commit

Permalink
Update doctest reference outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Ames committed Sep 18, 2024
1 parent b4f4b9d commit 1ea6c54
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/PyThermo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ end

abstract type Chemical end

const _DOC_PRECISION_FIX = r"(\d\.\d\d)\d*" => s"\1"

"""
Species(ID::String; T=298.15, P=101325)
Expand All @@ -64,12 +66,12 @@ P : pressure of the chemical (default 101325 Pa)
Examples
--------
```jldoctest pythermo; setup = :(using PyThermo)
```jldoctest pythermo; setup = :(using PyThermo); filter = $_DOC_PRECISION_FIX;
julia> He = Species("He")
Species(He, 298.1 K, 1.013e+05 Pa)
julia> density(He)
0.16352343013746262 kg m^-3
0.16360253235815483 kg m^-3
julia> using Unitful
Expand Down Expand Up @@ -130,12 +132,12 @@ The composition can also be specified by providing a vector of `"ID" => molefrac
Examples
--------
```jldoctest; setup = :(using PyThermo)
```jldoctest; setup = :(using PyThermo); filter = $_DOC_PRECISION_FIX;
julia> air = Mixture(["N2" => 0.78, "O2" => 0.21, "Ar" => 0.01])
Mixture(78% nitrogen, 21% oxygen, 1% argon, 298.1 K, 1.013e+05 Pa)
Mixture(78% N2, 21% O2, 1% Ar, 298.1 K, 1.013e+05 Pa)
julia> soundspeed(air)
346.14659461295173 m s^-1
346.1345044609487 m s^-1
```
"""
struct Mixture <: Chemical
Expand Down

0 comments on commit 1ea6c54

Please sign in to comment.