コード例 #1
0
ファイル: test_settings.py プロジェクト: Chocorean/OctoPrint
    def test_set_float_convert(self):
        with self.mocked_config():
            settings = octoprint.settings.Settings()

            settings.setFloat(["serial", "timeout", "detection"], "1.2")

            self.assertEqual(1.2, settings._config["serial"]["timeout"]["detection"])
コード例 #2
0
ファイル: test_settings.py プロジェクト: foosel/OctoPrint
	def test_set_float_convert(self):
		with self.mocked_config():
			settings = octoprint.settings.Settings()

			settings.setFloat(["serial", "timeout", "detection"], "1.2")

			self.assertEqual(1.2, settings._config["serial"]["timeout"]["detection"])
コード例 #3
0
ファイル: test_settings.py プロジェクト: tinkercnc/OctoPrint
 def test_set_float_convert(self):
     with self.settings() as settings:
         settings.setFloat(["serial", "timeout", "detection"], "1.2")
         self.assertEqual(1.2, settings._config["serial"]["timeout"]["detection"])