Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
a876aac2
Unverified
Commit
a876aac2
authored
Aug 16, 2020
by
Henry Schreiner
Committed by
GitHub
Aug 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: loosen test, not valid on some systems (#2399)
parent
cd856992
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
tests/test_chrono.py
+4
-6
No files found.
tests/test_chrono.py
View file @
a876aac2
...
...
@@ -15,14 +15,12 @@ def test_chrono_system_clock():
# The numbers should vary by a very small amount (time it took to execute)
diff
=
abs
(
date1
-
date2
)
# There should never be a days
/seconds
difference
# There should never be a days difference
assert
diff
.
days
==
0
assert
diff
.
seconds
==
0
# We test that no more than about 0.5 seconds passes here
# 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
# Since datetime.datetime.today() calls time.time(), and on some platforms
# that has 1 second accuracy, we should always be less than 2 seconds.
assert
diff
.
seconds
<
2
def
test_chrono_system_clock_roundtrip
():
...
...
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