aboutsummaryrefslogtreecommitdiff
path: root/tests/float/builtin_float_hash.py
diff options
context:
space:
mode:
authorDavid Lechner2020-03-22 21:26:08 -0500
committerDamien George2020-03-30 13:21:58 +1100
commit3dc324d3f1312e40d3a8ed87e7244966bb756f26 (patch)
tree94ff44f8eabba0039582c245b901173597edd11e /tests/float/builtin_float_hash.py
parent488613bca6c460340ed2995ae5cafafe22d0bfff (diff)
tests: Format all Python code with black, except tests in basics subdir.
This adds the Python files in the tests/ directory to be formatted with ./tools/codeformat.py. The basics/ subdirectory is excluded for now so we aren't changing too much at once. In a few places `# fmt: off`/`# fmt: on` was used where the code had special formatting for readability or where the test was actually testing the specific formatting.
Diffstat (limited to 'tests/float/builtin_float_hash.py')
-rw-r--r--tests/float/builtin_float_hash.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/tests/float/builtin_float_hash.py b/tests/float/builtin_float_hash.py
index 7a7e37401..1388bb0e8 100644
--- a/tests/float/builtin_float_hash.py
+++ b/tests/float/builtin_float_hash.py
@@ -2,24 +2,24 @@
# these should hash to an integer with a specific value
for val in (
- '0.0',
- '-0.0',
- '1.0',
- '2.0',
- '-12.0',
- '12345.0',
- ):
+ "0.0",
+ "-0.0",
+ "1.0",
+ "2.0",
+ "-12.0",
+ "12345.0",
+):
print(val, hash(float(val)))
# just check that these values are hashable
for val in (
- '0.1',
- '-0.1',
- '10.3',
- '0.4e3',
- '1e16',
- 'inf',
- '-inf',
- 'nan',
- ):
+ "0.1",
+ "-0.1",
+ "10.3",
+ "0.4e3",
+ "1e16",
+ "inf",
+ "-inf",
+ "nan",
+):
print(val, type(hash(float(val))))