We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b9c36c6 commit d9d3b32Copy full SHA for d9d3b32
1 file changed
tests/test_delta.py
@@ -0,0 +1,22 @@
1
+# Copyright (c) 2022-2024 J. D. Mitchell
2
+#
3
+# Distributed under the terms of the GPL license version 3.
4
5
+# The full license is in the file LICENSE, distributed with this software.
6
+"""
7
+This module contains some tests for the delta function.
8
9
+
10
+from datetime import datetime, timedelta
11
+from time import sleep
12
13
+from libsemigroups_pybind11 import delta
14
15
16
+def test_delta():
17
+ current_time = datetime.now()
18
+ wait_time = 10**-3
19
+ sleep(wait_time)
20
+ diff = delta(current_time)
21
+ assert isinstance(diff, timedelta)
22
+ assert diff > timedelta(seconds=wait_time)
0 commit comments