Skip to content
This repository has been archived by the owner on May 28, 2022. It is now read-only.

Commit

Permalink
Changes default value in FloatOption tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
FranciscoCanas committed Nov 20, 2014
1 parent 08784e5 commit 6428535
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/freeseer/tests/framework/config/options/test_float.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,22 @@ def setUp(self):
def test_schema(self):
"""Tests FloatOption schema method."""
self.assertRaises(ValidationError, validate, 'error', self.option.schema())
self.assertIsNone(validate(5.0, self.option.schema()))
self.assertIsNone(validate(5.5, self.option.schema()))
self.assertDictEqual(self.option.schema(), {'type': 'number'})


class TestFloatOptionWithDefault(TestFloatOptionNoDefault):
"""Tests FloatOption with a default value."""

def setUp(self):
self.option = FloatOption(1234.0)
self.option = FloatOption(1234.5)

def test_default(self):
"""Tests that the default was set correctly."""
self.assertEqual(self.option.default, 1234.0)
self.assertEqual(self.option.default, 1234.5)

def test_schema(self):
"""Tests FloatOption schema method."""
self.assertRaises(ValidationError, validate, 'error', self.option.schema())
self.assertIsNone(validate(5.0, self.option.schema()))
self.assertDictEqual(self.option.schema(), {'default': 1234.0, 'type': 'number'})
self.assertDictEqual(self.option.schema(), {'default': 1234.5, 'type': 'number'})

0 comments on commit 6428535

Please sign in to comment.