code: def test_horizontal_range(self):
      lscale = ttk.LabeledScale(self.root, from_=0, to=10)
      lscale.pack()
      lscale.wait_visibility()
      lscale.update()
  
      linfo_1 = lscale.label.place_info()
      prev_xcoord = lscale.scale.coords()[0]
      self.assertEqual(prev_xcoord, int(linfo_1["x"]))
      # change range to: from -5 to 5. This should change the x coord of
      # the scale widget, since 0 is at the middle of the new
      # range.
      lscale.scale.configure(from_=-5, to=5)
      # The following update is needed since the test doesn't use mainloop,
      # at the same time this shouldn't affect test outcome
      lscale.update()
      curr_xcoord = lscale.scale.coords()[0]
      self.assertNotEqual(prev_xcoord, curr_xcoord)
      # the label widget should have been repositioned too
      linfo_2 = lscale.label.place_info()
      self.assertEqual(
          lscale.label["text"], 0 if self.wantobjects else "0"
      )
      self.assertEqual(curr_xcoord, int(linfo_2["x"]))
      # change the range back
      lscale.scale.configure(from_=0, to=10)
      self.assertNotEqual(prev_xcoord, curr_xcoord)
      self.assertEqual(prev_xcoord, int(linfo_1["x"]))
  
      lscale.destroy()
  
imports: import sys
  import unittest
  import Tkinter
  import ttk
  from test.test_support import requires, run_unittest, swap_attr
  from test_ttk.support import AbstractTkTest, destroy_default_root
label_desc: Use image node_id 5 for calling the LabeledScaleTest obj's underlying member method code with example usage: obj.test_horizontal_range() without return types