Skip to content

bypass freezegun if installed #185

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions xmlrunner/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
from os import path
from six.moves import StringIO

# use direct import to bypass freezegun
from time import time

from .unittest import TestResult, _TextTestResult, failfast


Expand Down Expand Up @@ -247,7 +250,7 @@ def startTest(self, test):
"""
Called before execute each test method.
"""
self.start_time = time.time()
self.start_time = time()
TestResult.startTest(self, test)

if self.showAll:
Expand Down Expand Up @@ -294,7 +297,7 @@ def stopTest(self, test):
# self._stderr_data = sys.stderr.getvalue()

_TextTestResult.stopTest(self, test)
self.stop_time = time.time()
self.stop_time = time()

if self.callback and callable(self.callback):
self.callback()
Expand Down