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
4ef3a23a
Kaydet (Commit)
4ef3a23a
authored
Mar 30, 2006
tarafından
Anthony Baxter
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
whitespace normalisation
üst
ecdc0a9f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
24 deletions
+23
-24
install_egg_info.py
Lib/distutils/command/install_egg_info.py
+2
-2
test_generator_cycle.py
Lib/test/leakers/test_generator_cycle.py
+0
-1
test_augassign.py
Lib/test/test_augassign.py
+5
-5
test_coercion.py
Lib/test/test_coercion.py
+4
-4
test_decimal.py
Lib/test/test_decimal.py
+1
-1
test_index.py
Lib/test/test_index.py
+11
-11
No files found.
Lib/distutils/command/install_egg_info.py
Dosyayı görüntüle @
4ef3a23a
...
@@ -26,7 +26,7 @@ class install_egg_info(Command):
...
@@ -26,7 +26,7 @@ class install_egg_info(Command):
to_filename
(
safe_version
(
self
.
distribution
.
get_version
())),
to_filename
(
safe_version
(
self
.
distribution
.
get_version
())),
sys
.
version
[:
3
]
sys
.
version
[:
3
]
)
)
self
.
target
=
os
.
path
.
join
(
self
.
install_dir
,
basename
)
self
.
target
=
os
.
path
.
join
(
self
.
install_dir
,
basename
)
self
.
outputs
=
[
self
.
target
]
self
.
outputs
=
[
self
.
target
]
def
run
(
self
):
def
run
(
self
):
...
@@ -40,7 +40,7 @@ class install_egg_info(Command):
...
@@ -40,7 +40,7 @@ class install_egg_info(Command):
f
=
open
(
target
,
'w'
)
f
=
open
(
target
,
'w'
)
self
.
distribution
.
metadata
.
write_pkg_file
(
f
)
self
.
distribution
.
metadata
.
write_pkg_file
(
f
)
f
.
close
()
f
.
close
()
def
get_outputs
(
self
):
def
get_outputs
(
self
):
return
self
.
outputs
return
self
.
outputs
...
...
Lib/test/leakers/test_generator_cycle.py
Dosyayı görüntüle @
4ef3a23a
...
@@ -8,4 +8,3 @@ def leak():
...
@@ -8,4 +8,3 @@ def leak():
while
True
:
while
True
:
yield
g
yield
g
g
=
gen
()
g
=
gen
()
Lib/test/test_augassign.py
Dosyayı görüntüle @
4ef3a23a
...
@@ -64,7 +64,7 @@ class AugAssignTest(unittest.TestCase):
...
@@ -64,7 +64,7 @@ class AugAssignTest(unittest.TestCase):
x
*=
2
x
*=
2
self
.
assertEquals
(
x
,
[
1
,
2
,
3
,
4
,
1
,
2
,
3
,
4
])
self
.
assertEquals
(
x
,
[
1
,
2
,
3
,
4
,
1
,
2
,
3
,
4
])
x
=
[
1
,
2
,
3
]
x
=
[
1
,
2
,
3
]
y
=
x
y
=
x
x
[
1
:
2
]
*=
2
x
[
1
:
2
]
*=
2
...
@@ -82,7 +82,7 @@ class AugAssignTest(unittest.TestCase):
...
@@ -82,7 +82,7 @@ class AugAssignTest(unittest.TestCase):
return
self
.
val
+
val
return
self
.
val
+
val
def
__add__
(
self
,
val
):
def
__add__
(
self
,
val
):
return
aug_test
(
self
.
val
+
val
)
return
aug_test
(
self
.
val
+
val
)
class
aug_test2
(
aug_test
):
class
aug_test2
(
aug_test
):
def
__iadd__
(
self
,
val
):
def
__iadd__
(
self
,
val
):
self
.
val
=
self
.
val
+
val
self
.
val
=
self
.
val
+
val
...
@@ -91,7 +91,7 @@ class AugAssignTest(unittest.TestCase):
...
@@ -91,7 +91,7 @@ class AugAssignTest(unittest.TestCase):
class
aug_test3
(
aug_test
):
class
aug_test3
(
aug_test
):
def
__iadd__
(
self
,
val
):
def
__iadd__
(
self
,
val
):
return
aug_test3
(
self
.
val
+
val
)
return
aug_test3
(
self
.
val
+
val
)
x
=
aug_test
(
1
)
x
=
aug_test
(
1
)
y
=
x
y
=
x
x
+=
10
x
+=
10
...
@@ -103,7 +103,7 @@ class AugAssignTest(unittest.TestCase):
...
@@ -103,7 +103,7 @@ class AugAssignTest(unittest.TestCase):
x
=
aug_test2
(
2
)
x
=
aug_test2
(
2
)
y
=
x
y
=
x
x
+=
10
x
+=
10
self
.
assert_
(
y
is
x
)
self
.
assert_
(
y
is
x
)
self
.
assertEquals
(
x
.
val
,
12
)
self
.
assertEquals
(
x
.
val
,
12
)
...
@@ -319,7 +319,7 @@ __lshift__ called
...
@@ -319,7 +319,7 @@ __lshift__ called
__rlshift__ called
__rlshift__ called
__ilshift__ called
__ilshift__ called
'''
.
splitlines
())
'''
.
splitlines
())
def
test_main
():
def
test_main
():
run_unittest
(
AugAssignTest
)
run_unittest
(
AugAssignTest
)
...
...
Lib/test/test_coercion.py
Dosyayı görüntüle @
4ef3a23a
...
@@ -181,7 +181,7 @@ infix_results = {
...
@@ -181,7 +181,7 @@ infix_results = {
(
6
,
8
):
(
'e'
,
(
6
,
0
)),
(
6
,
8
):
(
'e'
,
(
6
,
0
)),
# MethodNumber(2)
# MethodNumber(2)
(
7
,
0
):
(
'e'
,
(
0
,
0
)),
(
7
,
0
):
(
'e'
,
(
0
,
0
)),
(
7
,
1
):
(
'e'
,
(
0
,
1
)),
(
7
,
1
):
(
'e'
,
(
0
,
1
)),
(
7
,
2
):
(
'e'
,
(
0
,
2
)),
(
7
,
2
):
(
'e'
,
(
0
,
2
)),
(
7
,
3
):
(
'e'
,
(
0
,
3
)),
(
7
,
3
):
(
'e'
,
(
0
,
3
)),
...
@@ -192,7 +192,7 @@ infix_results = {
...
@@ -192,7 +192,7 @@ infix_results = {
(
7
,
8
):
(
'e'
,
(
0
,
8
)),
(
7
,
8
):
(
'e'
,
(
0
,
8
)),
# CoerceNumber(2)
# CoerceNumber(2)
(
8
,
0
):
(
'e'
,
(
0
,
0
)),
(
8
,
0
):
(
'e'
,
(
0
,
0
)),
(
8
,
1
):
(
'e'
,
(
0
,
1
)),
(
8
,
1
):
(
'e'
,
(
0
,
1
)),
(
8
,
2
):
(
'e'
,
(
0
,
2
)),
(
8
,
2
):
(
'e'
,
(
0
,
2
)),
(
8
,
3
):
(
'e'
,
(
0
,
3
)),
(
8
,
3
):
(
'e'
,
(
0
,
3
)),
...
@@ -223,8 +223,8 @@ def process_infix_results():
...
@@ -223,8 +223,8 @@ def process_infix_results():
res
[
i
][
6
]
=
res
[
i
][
6
][
1
]
res
[
i
][
6
]
=
res
[
i
][
6
][
1
]
infix_results
[
key
]
=
res
infix_results
[
key
]
=
res
process_infix_results
()
process_infix_results
()
# now infix_results has two lists of results for every pairing.
# now infix_results has two lists of results for every pairing.
...
...
Lib/test/test_decimal.py
Dosyayı görüntüle @
4ef3a23a
...
@@ -517,7 +517,7 @@ class DecimalImplicitConstructionTest(unittest.TestCase):
...
@@ -517,7 +517,7 @@ class DecimalImplicitConstructionTest(unittest.TestCase):
else
:
else
:
# testing with -Qnew, so add __truediv__
# testing with -Qnew, so add __truediv__
oplist
.
append
((
'/'
,
'__truediv__'
,
'__rtruediv__'
))
oplist
.
append
((
'/'
,
'__truediv__'
,
'__rtruediv__'
))
for
sym
,
lop
,
rop
in
oplist
:
for
sym
,
lop
,
rop
in
oplist
:
setattr
(
E
,
lop
,
lambda
self
,
other
:
'str'
+
lop
+
str
(
other
))
setattr
(
E
,
lop
,
lambda
self
,
other
:
'str'
+
lop
+
str
(
other
))
setattr
(
E
,
rop
,
lambda
self
,
other
:
str
(
other
)
+
rop
+
'str'
)
setattr
(
E
,
rop
,
lambda
self
,
other
:
str
(
other
)
+
rop
+
'str'
)
...
...
Lib/test/test_index.py
Dosyayı görüntüle @
4ef3a23a
...
@@ -17,7 +17,7 @@ class ListTestCase(unittest.TestCase):
...
@@ -17,7 +17,7 @@ class ListTestCase(unittest.TestCase):
self
.
n
=
newstyle
()
self
.
n
=
newstyle
()
self
.
o2
=
oldstyle
()
self
.
o2
=
oldstyle
()
self
.
n2
=
newstyle
()
self
.
n2
=
newstyle
()
def
test_basic
(
self
):
def
test_basic
(
self
):
self
.
o
.
ind
=
-
2
self
.
o
.
ind
=
-
2
self
.
n
.
ind
=
2
self
.
n
.
ind
=
2
...
@@ -25,7 +25,7 @@ class ListTestCase(unittest.TestCase):
...
@@ -25,7 +25,7 @@ class ListTestCase(unittest.TestCase):
assert
(
self
.
seq
[
self
.
o
]
==
40
)
assert
(
self
.
seq
[
self
.
o
]
==
40
)
assert
(
operator
.
index
(
self
.
o
)
==
-
2
)
assert
(
operator
.
index
(
self
.
o
)
==
-
2
)
assert
(
operator
.
index
(
self
.
n
)
==
2
)
assert
(
operator
.
index
(
self
.
n
)
==
2
)
def
test_error
(
self
):
def
test_error
(
self
):
self
.
o
.
ind
=
'dumb'
self
.
o
.
ind
=
'dumb'
self
.
n
.
ind
=
'bad'
self
.
n
.
ind
=
'bad'
...
@@ -50,8 +50,8 @@ class TupleTestCase(unittest.TestCase):
...
@@ -50,8 +50,8 @@ class TupleTestCase(unittest.TestCase):
self
.
n
=
newstyle
()
self
.
n
=
newstyle
()
self
.
o2
=
oldstyle
()
self
.
o2
=
oldstyle
()
self
.
n2
=
newstyle
()
self
.
n2
=
newstyle
()
def
test_basic
(
self
):
def
test_basic
(
self
):
self
.
o
.
ind
=
-
2
self
.
o
.
ind
=
-
2
self
.
n
.
ind
=
2
self
.
n
.
ind
=
2
...
@@ -59,7 +59,7 @@ class TupleTestCase(unittest.TestCase):
...
@@ -59,7 +59,7 @@ class TupleTestCase(unittest.TestCase):
assert
(
self
.
seq
[
self
.
o
]
==
40
)
assert
(
self
.
seq
[
self
.
o
]
==
40
)
assert
(
operator
.
index
(
self
.
o
)
==
-
2
)
assert
(
operator
.
index
(
self
.
o
)
==
-
2
)
assert
(
operator
.
index
(
self
.
n
)
==
2
)
assert
(
operator
.
index
(
self
.
n
)
==
2
)
def
test_error
(
self
):
def
test_error
(
self
):
self
.
o
.
ind
=
'dumb'
self
.
o
.
ind
=
'dumb'
self
.
n
.
ind
=
'bad'
self
.
n
.
ind
=
'bad'
...
@@ -84,8 +84,8 @@ class StringTestCase(unittest.TestCase):
...
@@ -84,8 +84,8 @@ class StringTestCase(unittest.TestCase):
self
.
n
=
newstyle
()
self
.
n
=
newstyle
()
self
.
o2
=
oldstyle
()
self
.
o2
=
oldstyle
()
self
.
n2
=
newstyle
()
self
.
n2
=
newstyle
()
def
test_basic
(
self
):
def
test_basic
(
self
):
self
.
o
.
ind
=
-
2
self
.
o
.
ind
=
-
2
self
.
n
.
ind
=
2
self
.
n
.
ind
=
2
...
@@ -93,7 +93,7 @@ class StringTestCase(unittest.TestCase):
...
@@ -93,7 +93,7 @@ class StringTestCase(unittest.TestCase):
assert
(
self
.
seq
[
self
.
o
]
==
self
.
seq
[
-
2
])
assert
(
self
.
seq
[
self
.
o
]
==
self
.
seq
[
-
2
])
assert
(
operator
.
index
(
self
.
o
)
==
-
2
)
assert
(
operator
.
index
(
self
.
o
)
==
-
2
)
assert
(
operator
.
index
(
self
.
n
)
==
2
)
assert
(
operator
.
index
(
self
.
n
)
==
2
)
def
test_error
(
self
):
def
test_error
(
self
):
self
.
o
.
ind
=
'dumb'
self
.
o
.
ind
=
'dumb'
self
.
n
.
ind
=
'bad'
self
.
n
.
ind
=
'bad'
...
@@ -119,8 +119,8 @@ class UnicodeTestCase(unittest.TestCase):
...
@@ -119,8 +119,8 @@ class UnicodeTestCase(unittest.TestCase):
self
.
n
=
newstyle
()
self
.
n
=
newstyle
()
self
.
o2
=
oldstyle
()
self
.
o2
=
oldstyle
()
self
.
n2
=
newstyle
()
self
.
n2
=
newstyle
()
def
test_basic
(
self
):
def
test_basic
(
self
):
self
.
o
.
ind
=
-
2
self
.
o
.
ind
=
-
2
self
.
n
.
ind
=
2
self
.
n
.
ind
=
2
...
@@ -128,7 +128,7 @@ class UnicodeTestCase(unittest.TestCase):
...
@@ -128,7 +128,7 @@ class UnicodeTestCase(unittest.TestCase):
assert
(
self
.
seq
[
self
.
o
]
==
self
.
seq
[
-
2
])
assert
(
self
.
seq
[
self
.
o
]
==
self
.
seq
[
-
2
])
assert
(
operator
.
index
(
self
.
o
)
==
-
2
)
assert
(
operator
.
index
(
self
.
o
)
==
-
2
)
assert
(
operator
.
index
(
self
.
n
)
==
2
)
assert
(
operator
.
index
(
self
.
n
)
==
2
)
def
test_error
(
self
):
def
test_error
(
self
):
self
.
o
.
ind
=
'dumb'
self
.
o
.
ind
=
'dumb'
self
.
n
.
ind
=
'bad'
self
.
n
.
ind
=
'bad'
...
...
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