Skip to content

Create property unit validators #9

@Maxcode123

Description

@Maxcode123

These should raise validation errors:

P = Pressure(10, EnergyUnit.JOULE)
T = Temperature(20, LengthUnit.METER)
.
.
.

One shouldn't be able to instantiate a property with wrong units.
Also, setting wrong units should raise validation error.

T = Temperature(350, TemperatureUnit.KELVIN)
T.unit_descriptor = PressureUnit.BAR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions