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
4bd53b13
Kaydet (Commit)
4bd53b13
authored
Mar 13, 2012
tarafından
Senthil Kumaran
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
merge heads
üst
7554f0dd
5738e4f3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
loader.py
Lib/unittest/loader.py
+9
-4
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/unittest/loader.py
Dosyayı görüntüle @
4bd53b13
...
@@ -34,6 +34,11 @@ def _make_failed_test(classname, methodname, exception, suiteClass):
...
@@ -34,6 +34,11 @@ def _make_failed_test(classname, methodname, exception, suiteClass):
TestClass
=
type
(
classname
,
(
case
.
TestCase
,),
attrs
)
TestClass
=
type
(
classname
,
(
case
.
TestCase
,),
attrs
)
return
suiteClass
((
TestClass
(
methodname
),))
return
suiteClass
((
TestClass
(
methodname
),))
def
_jython_aware_splitext
(
path
):
if
path
.
lower
()
.
endswith
(
'$py.class'
):
return
path
[:
-
9
]
return
os
.
path
.
splitext
(
path
)[
0
]
class
TestLoader
(
object
):
class
TestLoader
(
object
):
"""
"""
...
@@ -221,7 +226,7 @@ class TestLoader(object):
...
@@ -221,7 +226,7 @@ class TestLoader(object):
return
os
.
path
.
dirname
(
full_path
)
return
os
.
path
.
dirname
(
full_path
)
def
_get_name_from_path
(
self
,
path
):
def
_get_name_from_path
(
self
,
path
):
path
=
os
.
path
.
splitext
(
os
.
path
.
normpath
(
path
))[
0
]
path
=
_jython_aware_splitext
(
os
.
path
.
normpath
(
path
))
_relpath
=
os
.
path
.
relpath
(
path
,
self
.
_top_level_dir
)
_relpath
=
os
.
path
.
relpath
(
path
,
self
.
_top_level_dir
)
assert
not
os
.
path
.
isabs
(
_relpath
),
"Path must be within the project"
assert
not
os
.
path
.
isabs
(
_relpath
),
"Path must be within the project"
...
@@ -258,11 +263,11 @@ class TestLoader(object):
...
@@ -258,11 +263,11 @@ class TestLoader(object):
yield
_make_failed_import_test
(
name
,
self
.
suiteClass
)
yield
_make_failed_import_test
(
name
,
self
.
suiteClass
)
else
:
else
:
mod_file
=
os
.
path
.
abspath
(
getattr
(
module
,
'__file__'
,
full_path
))
mod_file
=
os
.
path
.
abspath
(
getattr
(
module
,
'__file__'
,
full_path
))
realpath
=
os
.
path
.
splitext
(
mod_file
)[
0
]
realpath
=
_jython_aware_splitext
(
mod_file
)
fullpath_noext
=
os
.
path
.
splitext
(
full_path
)[
0
]
fullpath_noext
=
_jython_aware_splitext
(
full_path
)
if
realpath
.
lower
()
!=
fullpath_noext
.
lower
():
if
realpath
.
lower
()
!=
fullpath_noext
.
lower
():
module_dir
=
os
.
path
.
dirname
(
realpath
)
module_dir
=
os
.
path
.
dirname
(
realpath
)
mod_name
=
os
.
path
.
splitext
(
os
.
path
.
basename
(
full_path
))[
0
]
mod_name
=
_jython_aware_splitext
(
os
.
path
.
basename
(
full_path
))
expected_dir
=
os
.
path
.
dirname
(
full_path
)
expected_dir
=
os
.
path
.
dirname
(
full_path
)
msg
=
(
"
%
r module incorrectly imported from
%
r. Expected
%
r. "
msg
=
(
"
%
r module incorrectly imported from
%
r. Expected
%
r. "
"Is this module globally installed?"
)
"Is this module globally installed?"
)
...
...
Misc/NEWS
Dosyayı görüntüle @
4bd53b13
...
@@ -24,6 +24,8 @@ Core and Builtins
...
@@ -24,6 +24,8 @@ Core and Builtins
Library
Library
-------
-------
-
Issue
#
10543
:
Fix
unittest
test
discovery
with
Jython
bytecode
files
.
-
Issue
#
1178863
:
Separate
initialisation
from
setting
when
initializing
-
Issue
#
1178863
:
Separate
initialisation
from
setting
when
initializing
Tkinter
.
Variables
;
harmonize
exceptions
to
ValueError
;
only
delete
variables
Tkinter
.
Variables
;
harmonize
exceptions
to
ValueError
;
only
delete
variables
that
have
not
been
deleted
;
assert
that
variable
names
are
strings
.
that
have
not
been
deleted
;
assert
that
variable
names
are
strings
.
...
...
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