Esempio n. 1
0
 def test_width_returns_float_if_string_contains_string_of_number(self):
     result = tables._width("130")
     self.assertEqual(result, 130.0)
Esempio n. 2
0
 def test_width_returns_values_passed_if_string_and_ends_with_percent(self):
     result = tables._width("100%")
     self.assertEqual(result, "100%")
Esempio n. 3
0
 def test_width_will_convert_string_to_float_if_string_passed_in_doesnt_end_with_percent(self):
     result = tables._width("100")
     self.assertEqual(type(result), float)
Esempio n. 4
0
 def test_width_returns_none_if_value_passed_is_none(self):
     result = tables._width(None)
     self.assertEqual(result, None)
Esempio n. 5
0
 def test_width_returns_none_if_value_passed_is_none(self):
     result = tables._width(None)
     self.assertEqual(result, None)
Esempio n. 6
0
 def test_width_returns_float_if_string_contains_string_of_number(self):
     result = tables._width("130")
     self.assertEqual(result, 130.0)
Esempio n. 7
0
 def test_width_will_convert_string_to_float_if_string_passed_in_doesnt_end_with_percent(
         self):
     result = tables._width("100")
     self.assertEqual(type(result), float)
Esempio n. 8
0
 def test_width_returns_values_passed_if_string_and_ends_with_percent(self):
     result = tables._width("100%")
     self.assertEqual(result, "100%")