def test_field_name(self): spam = Spam() assert spam.field_name() == 'Spam'
def test_default_value(self): spam = Spam() assert spam.value == False and spam.score == 0.0 and spam.threshold == 0.0
def test_user_value(self): spam = Spam(value=True, score=4.0, threshold=2.0) assert spam.value == True and spam.score == 4.0 and spam.threshold == 2.0
def test_repr(self): spam = Spam(value=True, score=4.0, threshold=2.0) assert repr(spam) == 'Spam(value=True, score=4.0, threshold=2.0)'
def test_bytes(self): spam = Spam(value=True, score=4.0, threshold=2.0) assert bytes(spam) == b'Spam: True ; 4.0 / 2.0\r\n'
def test_instantiates(self): spam = Spam() assert 'spam' in locals()
def test_user_value(): spam = Spam(value=True, score=4.0, threshold=2.0) assert spam.value is True assert spam.score == 4.0 assert spam.threshold == 2.0
def test_default_value(): spam = Spam() assert spam.value is False assert spam.score == 0.0 assert spam.threshold == 0.0