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
09ce2786
Kaydet (Commit)
09ce2786
authored
Mar 24, 2015
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Fixed bytes warnings when run tests with -vv.
üst
15fa1c4a
b0749ca9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
test_cmd_line_script.py
Lib/test/test_cmd_line_script.py
+5
-5
test_multiprocessing_main_handling.py
Lib/test/test_multiprocessing_main_handling.py
+1
-1
No files found.
Lib/test/test_cmd_line_script.py
Dosyayı görüntüle @
09ce2786
...
@@ -114,7 +114,7 @@ class CmdLineTest(unittest.TestCase):
...
@@ -114,7 +114,7 @@ class CmdLineTest(unittest.TestCase):
expected_loader
):
expected_loader
):
if
verbose
>
1
:
if
verbose
>
1
:
print
(
"Output from test script
%
r:"
%
script_name
)
print
(
"Output from test script
%
r:"
%
script_name
)
print
(
data
)
print
(
repr
(
data
)
)
self
.
assertEqual
(
exit_code
,
0
)
self
.
assertEqual
(
exit_code
,
0
)
printed_loader
=
'__loader__==
%
a'
%
expected_loader
printed_loader
=
'__loader__==
%
a'
%
expected_loader
printed_file
=
'__file__==
%
a'
%
expected_file
printed_file
=
'__file__==
%
a'
%
expected_file
...
@@ -153,7 +153,7 @@ class CmdLineTest(unittest.TestCase):
...
@@ -153,7 +153,7 @@ class CmdLineTest(unittest.TestCase):
rc
,
out
,
err
=
assert_python_failure
(
*
run_args
)
rc
,
out
,
err
=
assert_python_failure
(
*
run_args
)
if
verbose
>
1
:
if
verbose
>
1
:
print
(
'Output from test script
%
r:'
%
script_name
)
print
(
'Output from test script
%
r:'
%
script_name
)
print
(
err
)
print
(
repr
(
err
)
)
print
(
'Expected output:
%
r'
%
expected_msg
)
print
(
'Expected output:
%
r'
%
expected_msg
)
self
.
assertIn
(
expected_msg
.
encode
(
'utf-8'
),
err
)
self
.
assertIn
(
expected_msg
.
encode
(
'utf-8'
),
err
)
...
@@ -362,7 +362,7 @@ class CmdLineTest(unittest.TestCase):
...
@@ -362,7 +362,7 @@ class CmdLineTest(unittest.TestCase):
script_name
=
_make_test_script
(
pkg_dir
,
'script'
)
script_name
=
_make_test_script
(
pkg_dir
,
'script'
)
rc
,
out
,
err
=
assert_python_ok
(
'-m'
,
'test_pkg.script'
,
*
example_args
,
__isolated
=
False
)
rc
,
out
,
err
=
assert_python_ok
(
'-m'
,
'test_pkg.script'
,
*
example_args
,
__isolated
=
False
)
if
verbose
>
1
:
if
verbose
>
1
:
print
(
out
)
print
(
repr
(
out
)
)
expected
=
"init_argv0==
%
r"
%
'-m'
expected
=
"init_argv0==
%
r"
%
'-m'
self
.
assertIn
(
expected
.
encode
(
'utf-8'
),
out
)
self
.
assertIn
(
expected
.
encode
(
'utf-8'
),
out
)
self
.
_check_output
(
script_name
,
rc
,
out
,
self
.
_check_output
(
script_name
,
rc
,
out
,
...
@@ -380,7 +380,7 @@ class CmdLineTest(unittest.TestCase):
...
@@ -380,7 +380,7 @@ class CmdLineTest(unittest.TestCase):
'import sys; print("sys.path[0]==
%
r"
%
sys.path[0])'
,
'import sys; print("sys.path[0]==
%
r"
%
sys.path[0])'
,
__isolated
=
False
)
__isolated
=
False
)
if
verbose
>
1
:
if
verbose
>
1
:
print
(
out
)
print
(
repr
(
out
)
)
expected
=
"sys.path[0]==
%
r"
%
''
expected
=
"sys.path[0]==
%
r"
%
''
self
.
assertIn
(
expected
.
encode
(
'utf-8'
),
out
)
self
.
assertIn
(
expected
.
encode
(
'utf-8'
),
out
)
...
@@ -410,7 +410,7 @@ class CmdLineTest(unittest.TestCase):
...
@@ -410,7 +410,7 @@ class CmdLineTest(unittest.TestCase):
"if __name__ == '__main__': raise ValueError"
)
"if __name__ == '__main__': raise ValueError"
)
rc
,
out
,
err
=
assert_python_failure
(
'-m'
,
'test_pkg.other'
,
*
example_args
)
rc
,
out
,
err
=
assert_python_failure
(
'-m'
,
'test_pkg.other'
,
*
example_args
)
if
verbose
>
1
:
if
verbose
>
1
:
print
(
out
)
print
(
repr
(
out
)
)
self
.
assertEqual
(
rc
,
1
)
self
.
assertEqual
(
rc
,
1
)
def
test_pep_409_verbiage
(
self
):
def
test_pep_409_verbiage
(
self
):
...
...
Lib/test/test_multiprocessing_main_handling.py
Dosyayı görüntüle @
09ce2786
...
@@ -143,7 +143,7 @@ class MultiProcessingCmdLineMixin():
...
@@ -143,7 +143,7 @@ class MultiProcessingCmdLineMixin():
def
_check_output
(
self
,
script_name
,
exit_code
,
out
,
err
):
def
_check_output
(
self
,
script_name
,
exit_code
,
out
,
err
):
if
verbose
>
1
:
if
verbose
>
1
:
print
(
"Output from test script
%
r:"
%
script_name
)
print
(
"Output from test script
%
r:"
%
script_name
)
print
(
out
)
print
(
repr
(
out
)
)
self
.
assertEqual
(
exit_code
,
0
)
self
.
assertEqual
(
exit_code
,
0
)
self
.
assertEqual
(
err
.
decode
(
'utf-8'
),
''
)
self
.
assertEqual
(
err
.
decode
(
'utf-8'
),
''
)
expected_results
=
"
%
s -> [1, 4, 9]"
%
self
.
start_method
expected_results
=
"
%
s -> [1, 4, 9]"
%
self
.
start_method
...
...
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