示例#1
0
def test_helper_base_format_timedelta_none(settings):
    assert format_timedelta(None) == '---'
示例#2
0
 def test_format_timedelta_days(self):
     duration = timedelta(days=2, minutes=1, seconds=8)
     assert_equal(format_timedelta(duration),
                  '2 days, 1 minutes, 8 seconds')
示例#3
0
 def test_format_timedelta_0(self):
     assert_equal(format_timedelta(timedelta(seconds=0)), '0 seconds')
示例#4
0
 def test_format_timedelta_seconds(self):
     assert_equal(format_timedelta(timedelta(seconds=5)), '5 seconds')
示例#5
0
 def test_format_timedelta_minutes(self):
     duration = timedelta(minutes=1, seconds=7)
     assert_equal(format_timedelta(duration), '1 minutes, 7 seconds')
示例#6
0
def test_helper_base_format_timedelta_days(settings):
    duration = timedelta(days=2, minutes=1, seconds=8)
    assert format_timedelta(duration) == '2 days, 1 minutes, 8 seconds'
示例#7
0
def test_helper_base_format_timedelta_seconds(settings):
    assert format_timedelta(timedelta(seconds=5)) == '5 seconds'
示例#8
0
 def test_format_timedelta_minutes(self):
     duration = timedelta(minutes=1, seconds=7)
     assert_equal(format_timedelta(duration), '1 minutes, 7 seconds')
示例#9
0
 def test_format_timedelta_days(self):
     duration = timedelta(days=2, minutes=1, seconds=8)
     assert_equal(format_timedelta(duration), '2 days, 1 minutes, 8 seconds')
示例#10
0
 def test_format_timedelta_none(self):
     assert_equal(format_timedelta(None), '---')
示例#11
0
 def test_format_timedelta_seconds(self):
     assert_equal(format_timedelta(timedelta(seconds=5)), '5 seconds')
示例#12
0
def test_helper_base_format_timedelta_0(settings):
    assert format_timedelta(timedelta(seconds=0)) == '0 seconds'
示例#13
0
def test_helper_base_format_timedelta_days(settings):
    duration = timedelta(days=2, minutes=1, seconds=8)
    assert format_timedelta(duration) == '2 days, 1 minutes, 8 seconds'
示例#14
0
def test_helper_base_format_timedelta_minutes(settings):
    duration = timedelta(minutes=1, seconds=7)
    assert format_timedelta(duration) == '1 minutes, 7 seconds'
示例#15
0
def test_helper_base_format_timedelta_seconds(settings):
    assert format_timedelta(timedelta(seconds=5)) == '5 seconds'
示例#16
0
 def test_format_timedelta_0(self):
     assert_equal(format_timedelta(timedelta(seconds=0)), '0 seconds')
示例#17
0
def test_helper_base_format_timedelta_minutes(settings):
    duration = timedelta(minutes=1, seconds=7)
    assert format_timedelta(duration) == '1 minutes, 7 seconds'
示例#18
0
 def test_format_timedelta_none(self):
     assert_equal(format_timedelta(None), '---')
示例#19
0
def test_helper_base_format_timedelta_0(settings):
    assert format_timedelta(timedelta(seconds=0)) == '0 seconds'
示例#20
0
def test_helper_base_format_timedelta_none(settings):
    assert format_timedelta(None) == '---'