Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
df723e1e
Kaydet (Commit)
df723e1e
authored
Mar 12, 2012
tarafından
Ezio Melotti
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#14179: add tests for re.compile. Patch by Florian Mladitsch.
üst
1d4798cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
test_re.py
Lib/test/test_re.py
+10
-0
ACKS
Misc/ACKS
+1
-0
No files found.
Lib/test/test_re.py
Dosyayı görüntüle @
df723e1e
...
@@ -818,6 +818,16 @@ class ReTests(unittest.TestCase):
...
@@ -818,6 +818,16 @@ class ReTests(unittest.TestCase):
self
.
assertRaises
(
OverflowError
,
_sre
.
compile
,
"abc"
,
0
,
[
long_overflow
])
self
.
assertRaises
(
OverflowError
,
_sre
.
compile
,
"abc"
,
0
,
[
long_overflow
])
self
.
assertRaises
(
TypeError
,
_sre
.
compile
,
{},
0
,
[])
self
.
assertRaises
(
TypeError
,
_sre
.
compile
,
{},
0
,
[])
def
test_compile
(
self
):
# Test return value when given string and pattern as parameter
pattern
=
re
.
compile
(
'random pattern'
)
self
.
assertIsInstance
(
pattern
,
re
.
_pattern_type
)
same_pattern
=
re
.
compile
(
pattern
)
self
.
assertIsInstance
(
same_pattern
,
re
.
_pattern_type
)
self
.
assertIs
(
same_pattern
,
pattern
)
# Test behaviour when not given a string or pattern as parameter
self
.
assertRaises
(
TypeError
,
re
.
compile
,
0
)
def
run_re_tests
():
def
run_re_tests
():
from
test.re_tests
import
tests
,
SUCCEED
,
FAIL
,
SYNTAX_ERROR
from
test.re_tests
import
tests
,
SUCCEED
,
FAIL
,
SYNTAX_ERROR
if
verbose
:
if
verbose
:
...
...
Misc/ACKS
Dosyayı görüntüle @
df723e1e
...
@@ -629,6 +629,7 @@ Roman Milner
...
@@ -629,6 +629,7 @@ Roman Milner
Andrii V. Mishkovskyi
Andrii V. Mishkovskyi
Dustin J. Mitchell
Dustin J. Mitchell
Dom Mitchell
Dom Mitchell
Florian Mladitsch
Doug Moen
Doug Moen
The Dragon De Monsyne
The Dragon De Monsyne
Skip Montanaro
Skip Montanaro
...
...
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