Example #1
0
def exercise_user_plus_sys_time():
    s = StringIO()
    utils.user_plus_sys_time().show_elapsed(out=s, prefix="e: ")
    s = s.getvalue()
    assert s.startswith("e: ")
    assert s.endswith(" s")
    utils.user_plus_sys_time().show_delta(out=s, prefix="d: ")
    s = s.getvalue()
    assert s.startswith("d: ")
    assert s.endswith(" s")
Example #2
0
def exercise_user_plus_sys_time():
  s = StringIO()
  utils.user_plus_sys_time().show_elapsed(out=s, prefix="e: ")
  s = s.getvalue()
  assert s.startswith("e: ")
  assert s.endswith(" s")
  utils.user_plus_sys_time().show_delta(out=s, prefix="d: ")
  s = s.getvalue()
  assert s.startswith("d: ")
  assert s.endswith(" s")