File: err_157.py

package info (click to toggle)
python-refurb 1.27.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,700 kB
  • sloc: python: 9,468; makefile: 40; sh: 6
file content (29 lines) | stat: -rw-r--r-- 572 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import decimal
from decimal import Decimal

# these should match

_ = Decimal("0")
_ = Decimal("+0")
_ = Decimal("-0")
_ = Decimal("-1234")
_ = Decimal("1234")
_ = Decimal("01234")
_ = Decimal("\r\n\r 1234")
_ = Decimal(float("Infinity"))
_ = Decimal(float("-Infinity"))
_ = Decimal(float("inf"))
_ = Decimal(float("-inf"))
_ = Decimal(float("-INF"))
_ = Decimal(float("NaN"))
_ = Decimal(float("nan"))
_ = decimal.Decimal("0")
_ = decimal.Decimal(float("nan"))


# these should not

_ = Decimal("3.14")
_ = Decimal("10e3")
_ = Decimal(float("3.14"))
_ = Decimal("0x123")