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
f254a751
Kaydet (Commit)
f254a751
authored
Ock 30, 2009
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Merge testing ABCs for importlib into importlib.test.abc.
üst
b18b936e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
47 deletions
+45
-47
abc.py
Lib/importlib/test/abc.py
+37
-0
test_finder.py
Lib/importlib/test/builtin/test_finder.py
+2
-2
test_finder.py
Lib/importlib/test/extension/test_finder.py
+2
-2
finder_tests.py
Lib/importlib/test/finder_tests.py
+0
-39
test_finder.py
Lib/importlib/test/frozen/test_finder.py
+2
-2
test_finder.py
Lib/importlib/test/source/test_finder.py
+2
-2
No files found.
Lib/importlib/test/
loader_tests
.py
→
Lib/importlib/test/
abc
.py
Dosyayı görüntüle @
f254a751
...
...
@@ -2,6 +2,43 @@ import abc
import
unittest
class
FinderTests
(
unittest
.
TestCase
,
metaclass
=
abc
.
ABCMeta
):
"""Basic tests for a finder to pass."""
@abc.abstractmethod
def
test_module
(
self
):
# Test importing a top-level module.
pass
@abc.abstractmethod
def
test_package
(
self
):
# Test importing a package.
pass
@abc.abstractmethod
def
test_module_in_package
(
self
):
# Test importing a module contained within a package.
# A value for 'path' should be used if for a meta_path finder.
pass
@abc.abstractmethod
def
test_package_in_package
(
self
):
# Test importing a subpackage.
# A value for 'path' should be used if for a meta_path finder.
pass
@abc.abstractmethod
def
test_package_over_module
(
self
):
# Test that packages are chosen over modules.
pass
@abc.abstractmethod
def
test_failure
(
self
):
# Test trying to find a module that cannot be handled.
pass
class
LoaderTests
(
unittest
.
TestCase
,
metaclass
=
abc
.
ABCMeta
):
@abc.abstractmethod
...
...
Lib/importlib/test/builtin/test_finder.py
Dosyayı görüntüle @
f254a751
from
importlib
import
machinery
from
..
import
finder_tests
from
..
import
abc
from
..
import
support
import
sys
import
unittest
class
FinderTests
(
finder_tests
.
FinderTests
):
class
FinderTests
(
abc
.
FinderTests
):
"""Test find_module() for built-in modules."""
...
...
Lib/importlib/test/extension/test_finder.py
Dosyayı görüntüle @
f254a751
import
importlib
from
..
import
finder_tests
from
..
import
abc
from
.
import
test_path_hook
import
unittest
class
FinderTests
(
finder_tests
.
FinderTests
):
class
FinderTests
(
abc
.
FinderTests
):
"""Test the finder for extension modules."""
...
...
Lib/importlib/test/finder_tests.py
deleted
100644 → 0
Dosyayı görüntüle @
b18b936e
import
abc
import
unittest
class
FinderTests
(
unittest
.
TestCase
,
metaclass
=
abc
.
ABCMeta
):
"""Basic tests for a finder to pass."""
@abc.abstractmethod
def
test_module
(
self
):
# Test importing a top-level module.
pass
@abc.abstractmethod
def
test_package
(
self
):
# Test importing a package.
pass
@abc.abstractmethod
def
test_module_in_package
(
self
):
# Test importing a module contained within a package.
# A value for 'path' should be used if for a meta_path finder.
pass
@abc.abstractmethod
def
test_package_in_package
(
self
):
# Test importing a subpackage.
# A value for 'path' should be used if for a meta_path finder.
pass
@abc.abstractmethod
def
test_package_over_module
(
self
):
# Test that packages are chosen over modules.
pass
@abc.abstractmethod
def
test_failure
(
self
):
# Test trying to find a module that cannot be handled.
pass
Lib/importlib/test/frozen/test_finder.py
Dosyayı görüntüle @
f254a751
from
...
import
machinery
from
..
import
finder_tests
from
..
import
abc
import
unittest
class
FinderTests
(
finder_tests
.
FinderTests
):
class
FinderTests
(
abc
.
FinderTests
):
"""Test finding frozen modules."""
...
...
Lib/importlib/test/source/test_finder.py
Dosyayı görüntüle @
f254a751
import
importlib
from
..
import
finder_tests
from
..
import
abc
from
..
import
support
import
os
import
py_compile
...
...
@@ -7,7 +7,7 @@ import unittest
import
warnings
class
FinderTests
(
finder_tests
.
FinderTests
):
class
FinderTests
(
abc
.
FinderTests
):
"""For a top-level module, it should just be found directly in the
directory being searched. This is true for a directory with source
...
...
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