| 1 |
# This file is part of Hypothesis, which may be found at |
| 2 |
# https://github.com/HypothesisWorks/hypothesis/ |
| 3 |
# |
| 4 |
# Copyright the Hypothesis Authors. |
| 5 |
# Individual contributors are listed in AUTHORS.rst and the git log. |
| 6 |
# |
| 7 |
# This Source Code Form is subject to the terms of the Mozilla Public License, |
| 8 |
# v. 2.0. If a copy of the MPL was not distributed with this file, You can |
| 9 |
# obtain one at https://mozilla.org/MPL/2.0/. |
| 10 |
|
| 11 |
import time |
| 12 |
|
| 13 |
from tests.common import TIME_INCREMENT |
| 14 |
from tests.common.utils import skipif_time_unpatched |
| 15 |
|
| 16 |
|
| 17 |
@skipif_time_unpatched |
| 18 |
def test_time_consistently_increments_in_tests(): |
| 19 |
x = time.time() |
| 20 |
y = time.time() |
| 21 |
z = time.time() |
| 22 |
assert y == x + TIME_INCREMENT |
| 23 |
assert z == y + TIME_INCREMENT |