コード例 #1
0
ファイル: test_time.py プロジェクト: Lothiraldan/testfixtures
 def test_add_kw(self):
     from time import time
     time.add(year=2001,month=1,day=1,hour=1,second=1)
     compare(time(),978310801.0)
コード例 #2
0
 def test_add_tzinfo_kw(self):
     from time import time
     with ShouldRaise(TypeError('Cannot add tzinfo to ttime')):
         time.add(year=2001, tzinfo=TestTZInfo())
コード例 #3
0
 def test_add_tzinfo_args(self):
     from time import time
     with ShouldRaise(TypeError('Cannot add tzinfo to ttime')):
         time.add(2001, 1, 2, 3, 4, 5, 6, TestTZInfo())
コード例 #4
0
 def test_add_kw(self):
     from time import time
     time.add(year=2001, month=1, day=1, hour=1, second=1)
     compare(time(), 978310801.0)
コード例 #5
0
ファイル: test_time.py プロジェクト: CortlandtW/PythonBits
 def test_add_tzinfo_args(self):
     from time import time
     with ShouldRaise(TypeError('Cannot add tzinfo to ttime')):
         time.add(2001,1,2,3,4,5,6,TestTZInfo())
コード例 #6
0
ファイル: test_time.py プロジェクト: CortlandtW/PythonBits
 def test_add_tzinfo_kw(self):
     from time import time
     with ShouldRaise(TypeError('Cannot add tzinfo to ttime')):
         time.add(year=2001,tzinfo=TestTZInfo())
コード例 #7
0
ファイル: test_time.py プロジェクト: ZecaSouza/Automacao
 def test_add_tzinfo_args(self):
     from time import time
     with ShouldRaise(TypeError('Cannot add using tzinfo on ttime')):
         time.add(2001, 1, 2, 3, 4, 5, 6, SampleTZInfo())
コード例 #8
0
ファイル: test_time.py プロジェクト: ZecaSouza/Automacao
 def test_add_tzinfo_kw(self):
     from time import time
     with ShouldRaise(TypeError('Cannot add using tzinfo on ttime')):
         time.add(year=2001, tzinfo=SampleTZInfo())