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
c2ed621d
Kaydet (Commit)
c2ed621d
authored
Agu 01, 2000
tarafından
Fredrik Lundh
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
-- SRE 0.9.8: updated test scripts
üst
a4e9a333
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
21 deletions
+6
-21
test_re
Lib/test/output/test_re
+0
-11
test_sre
Lib/test/output/test_sre
+0
-5
test_sre.py
Lib/test/test_sre.py
+6
-5
No files found.
Lib/test/output/test_re
Dosyayı görüntüle @
c2ed621d
test_re
=== Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A')
=== Fails on case-insensitive match ('^(.+)?B', 'AB', 0, 'g1', 'A')
=== Fails on locale-sensitive match ('^(.+)?B', 'AB', 0, 'g1', 'A')
=== Failed incorrectly ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a')
=== Fails on case-insensitive match ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a')
=== Fails on locale-sensitive match ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a')
=== grouping error ('(a)(b)c|ab', 'ab', 0, 'found+"-"+g1+"-"+g2', 'ab-None-None') 'ab-None-b' should be 'ab-None-None'
=== grouping error ('(a)+b|aac', 'aac', 0, 'found+"-"+g1', 'aac-None') 'aac-a' should be 'aac-None'
=== Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A')
=== Fails on case-insensitive match ('^(.+)?B', 'AB', 0, 'g1', 'A')
=== Fails on locale-sensitive match ('^(.+)?B', 'AB', 0, 'g1', 'A')
Lib/test/output/test_sre
Dosyayı görüntüle @
c2ed621d
test_sre
=== Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A')
=== Failed incorrectly ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a')
=== grouping error ('(a)(b)c|ab', 'ab', 0, 'found+"-"+g1+"-"+g2', 'ab-None-None') 'ab-None-b' should be 'ab-None-None'
=== grouping error ('(a)+b|aac', 'aac', 0, 'found+"-"+g1', 'aac-None') 'aac-a' should be 'aac-None'
=== Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A')
Lib/test/test_sre.py
Dosyayı görüntüle @
c2ed621d
...
...
@@ -152,9 +152,10 @@ try:
assert
sre
.
split
(
"(?::*)"
,
":a:b::c"
)
==
[
''
,
'a'
,
'b'
,
'c'
]
assert
sre
.
split
(
"(:)*"
,
":a:b::c"
)
==
[
''
,
':'
,
'a'
,
':'
,
'b'
,
':'
,
'c'
]
assert
sre
.
split
(
"([b:]+)"
,
":a:b::c"
)
==
[
''
,
':'
,
'a'
,
':b::'
,
'c'
]
# FIXME: group problem
# assert sre.split("(b)|(:+)", ":a:b::c") == \
# ['', None, ':', 'a', None, ':', '', 'b', None, '', None, '::', 'c']
## print sre.split("(b)|(:+)", ":a:b::c")
## print ['', None, ':', 'a', None, ':', '', 'b', None, '', None, '::', 'c']
## assert sre.split("(b)|(:+)", ":a:b::c") == \
## ['', None, ':', 'a', None, ':', '', 'b', None, '', None, '::', 'c']
assert
sre
.
split
(
"(?:b)|(?::+)"
,
":a:b::c"
)
==
[
''
,
'a'
,
''
,
''
,
'c'
]
except
AssertionError
:
raise
TestFailed
,
"sre.split"
...
...
@@ -377,8 +378,8 @@ for t in tests:
if
result
==
None
:
print
'=== Fails on locale-sensitive match'
,
t
# Try the match with UNICODE
enabled, and check that it
# still succeeds.
# Try the match with UNICODE
locale enabled, and check
#
that it
still succeeds.
obj
=
sre
.
compile
(
pattern
,
sre
.
UNICODE
)
result
=
obj
.
search
(
s
)
if
result
==
None
:
...
...
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