from habitmove import nomiedata def test_score_numerical_becomes_int(): sut = nomiedata.Tracker(label="Int checking", tag="isint", id="1337", score="-1") assert type(sut.score) == int def test_score_invalid_int_stays_string(): sut = nomiedata.Tracker(label="Int checking", tag="isint", id="1337", score="-1.3") assert type(sut.score) == str def test_score_string_stays_string(): sut = nomiedata.Tracker( label="Int checking", tag="isint", id="1337", score="custom" ) assert type(sut.score) == str