Esempio n. 1
0
 def test_set(self):
     from time import time
     time.set(2001,1,1,1,0,1)
     compare(time(),978310801.0)
     time.set(2002,1,1,1,0,0)
     compare(time(),1009846800.0)
     compare(time(),1009846802.0)
Esempio n. 2
0
 def test_set(self):
     from time import time
     time.set(2001, 1, 1, 1, 0, 1)
     compare(time(), 978310801.0)
     time.set(2002, 1, 1, 1, 0, 0)
     compare(time(), 1009846800.0)
     compare(time(), 1009846802.0)
Esempio n. 3
0
 def test_set_kw(self):
     from time import time
     time.set(year=2001,month=1,day=1,hour=1,second=1)
     compare(time(),978310801.0)
Esempio n. 4
0
 def test_set_kw_tzinfo(self):
     from time import time
     with ShouldRaise(TypeError('Cannot set tzinfo on ttime')):
         time.set(year=2001, tzinfo=TestTZInfo())
Esempio n. 5
0
 def test_set_kw(self):
     from time import time
     time.set(year=2001, month=1, day=1, hour=1, second=1)
     compare(time(), 978310801.0)
Esempio n. 6
0
 def test_set_args_tzinfo(self):
     from time import time
     with ShouldRaise(TypeError('Cannot set tzinfo on ttime')):
         time.set(2002, 1, 2, 3, 4, 5, 6, TestTZInfo())
Esempio n. 7
0
 def test_set_args_tzinfo(self):
     from time import time
     with ShouldRaise(TypeError('Cannot set tzinfo on ttime')):
         time.set(2002,1,2,3,4,5,6,TestTZInfo())
Esempio n. 8
0
 def test_set_kw_tzinfo(self):
     from time import time
     with ShouldRaise(TypeError('Cannot set tzinfo on ttime')):
         time.set(year=2001,tzinfo=TestTZInfo())
Esempio n. 9
0
 def test_set_kw_tzinfo(self):
     from time import time
     with ShouldRaise(TypeError('Cannot add using tzinfo on ttime')):
         time.set(year=2001, tzinfo=SampleTZInfo())
Esempio n. 10
0
containerFrame = Frame(root)
containerFrame.grid(row=3)

eventsFrame = Frame(containerFrame, relief=SUNKEN, padx=10, pady=10)
eventsFrame.grid(row=3)
events = StringVar()
eventsPerSecond = Spinbox(eventsFrame, from_=1, to=1000, width=5)
eventsPerSecond.grid(row=0)
events.set(1)
eventsPerSecLabel = Label(eventsFrame, text='Events Per')
eventsPerSecLabel.grid(row=0, column=1)

time = StringVar()
timeTextBox = Entry(eventsFrame, width=5, textvariable=time, justify=CENTER)
timeTextBox.grid(row=0, column=2)
time.set(1000)
timeLabel = Label(eventsFrame, text='ms')
timeLabel.grid(row=0, column=3)
timeFieldIndexTextBox = Entry(eventsFrame, width=7, justify=CENTER)
timeFieldIndexTextBox.grid(row=1, columnspan=3, sticky=W, pady=5)
timeFieldIndexLabel = Label(eventsFrame, text='Time Field #')
timeFieldIndexLabel.grid(row=1, column=1)

continueFrame = Frame(containerFrame, bd=1, padx=10, pady=10)
continueFrame.grid(row=3, column=1)
checked = IntVar()
continuousLoop = Checkbutton(continueFrame, text='Continuous Loop', variable=checked)
continuousLoop.grid(row=0)
skip = IntVar()
skipFirstLine = Checkbutton(continueFrame, text='Skip First Line', variable=skip)
skipFirstLine.grid(row=1, sticky=W)