Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
253e41cc
Commit
253e41cc
authored
Sep 28, 2016
by
Trent Houliston
Browse files
Relax constraints on testing to ensure they work in all cases.
parent
ad3bb9bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
tests/test_chrono.py
tests/test_chrono.py
+5
-3
No files found.
tests/test_chrono.py
View file @
253e41cc
...
@@ -18,8 +18,10 @@ def test_chrono_system_clock():
...
@@ -18,8 +18,10 @@ def test_chrono_system_clock():
assert
diff
.
days
==
0
assert
diff
.
days
==
0
assert
diff
.
seconds
==
0
assert
diff
.
seconds
==
0
# 50 milliseconds is a very long time to execute this
# We test that no more than about 0.5 seconds passes here
assert
diff
.
microseconds
<
50000
# This makes sure that the dates created are very close to the same
# but if the testing system is incredibly overloaded this should still pass
assert
diff
.
microseconds
<
500000
def
test_chrono_system_clock_roundtrip
():
def
test_chrono_system_clock_roundtrip
():
...
@@ -111,4 +113,4 @@ def test_floating_point_duration():
...
@@ -111,4 +113,4 @@ def test_floating_point_duration():
assert
isinstance
(
time
,
datetime
.
timedelta
)
assert
isinstance
(
time
,
datetime
.
timedelta
)
assert
time
.
seconds
==
35
assert
time
.
seconds
==
35
assert
time
.
microseconds
=
=
525123
assert
525122
<=
time
.
microseconds
<
=
525123
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment