summaryrefslogtreecommitdiffstats
path: root/Modules/_decimal/tests/formathelper.py
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2013-05-29 13:45:38 (GMT)
committerStefan Krah <skrah@bytereef.org>2013-05-29 13:45:38 (GMT)
commit6edda14b2968ca07b94a2fdde4dd43215222fcd8 (patch)
treed404076004687dade874d90bf7340af609ba5f50 /Modules/_decimal/tests/formathelper.py
parentc70a6ae49bd162af06130e48a45579d445e058a8 (diff)
downloadcpython-6edda14b2968ca07b94a2fdde4dd43215222fcd8.zip
cpython-6edda14b2968ca07b94a2fdde4dd43215222fcd8.tar.gz
cpython-6edda14b2968ca07b94a2fdde4dd43215222fcd8.tar.bz2
Issue #17768: Support newline fill character in decimal.py and NUL fill
character in _decimal.c.
Diffstat (limited to 'Modules/_decimal/tests/formathelper.py')
-rw-r--r--Modules/_decimal/tests/formathelper.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/_decimal/tests/formathelper.py b/Modules/_decimal/tests/formathelper.py
index 9da2b37..19b2aad 100644
--- a/Modules/_decimal/tests/formathelper.py
+++ b/Modules/_decimal/tests/formathelper.py
@@ -215,8 +215,6 @@ def check_fillchar(i):
c = chr(i)
c.encode('utf-8').decode()
format(P.Decimal(0), c + '<19g')
- if c in ("'", '"', '\\'):
- return None
return c
except:
return None
@@ -224,14 +222,14 @@ def check_fillchar(i):
# Generate all unicode characters that are accepted as
# fill characters by decimal.py.
def all_fillchars():
- for i in range(32, 0x110002):
+ for i in range(0, 0x110002):
c = check_fillchar(i)
if c: yield c
# Return random fill character.
def rand_fillchar():
while 1:
- i = random.randrange(32, 0x110002)
+ i = random.randrange(0, 0x110002)
c = check_fillchar(i)
if c: return c