Beispiel #1
0
    def test_get_float_invalid(self):
        with self.mocked_config():
            settings = octoprint.settings.Settings()

            value = settings.getFloat(["server", "host"])

            self.assertIsNone(value)
Beispiel #2
0
    def test_get_float_converted(self):
        with self.mocked_config():
            settings = octoprint.settings.Settings()

            value = settings.getFloat(["serial", "timeout", "connection"])

            self.assertEqual(5.0, value)
Beispiel #3
0
	def test_get_float_invalid(self):
		with self.mocked_config():
			settings = octoprint.settings.Settings()

			value = settings.getFloat(["server", "host"])

			self.assertIsNone(value)
Beispiel #4
0
	def test_get_float_converted(self):
		with self.mocked_config():
			settings = octoprint.settings.Settings()

			value = settings.getFloat(["serial", "timeout", "connection"])

			self.assertEqual(5.0, value)
Beispiel #5
0
 def test_get_float_invalid(self):
     with self.settings() as settings:
         value = settings.getFloat(["server", "host"])
         self.assertIsNone(value)
Beispiel #6
0
 def test_get_float_converted(self):
     with self.settings() as settings:
         value = settings.getFloat(["serial", "timeout", "connection"])
         self.assertEqual(5.0, value)