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
e6b7033e
Kaydet (Commit)
e6b7033e
authored
Nis 30, 2003
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Flesh out test_support docs.
üst
533366be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
README
Lib/test/README
+19
-3
No files found.
Lib/test/README
Dosyayı görüntüle @
e6b7033e
...
...
@@ -332,10 +332,22 @@ test_support provides the following useful objects:
platform doesn't offer all the required facilities (like large
file support), even if all the required modules are available.
* ``ResourceDenied`` - this is raised when a test requires a resource that
is not available. Primarily used by 'requires'.
* ``verbose`` - you can use this variable to control print output. Many
modules use it. Search for "verbose" in the test_*.py files to see
lots of examples.
* ``forget(module_name)`` - attempts to cause Python to "forget" that it
loaded a module and erase any PYC files.
* ``is_resource_enabled(resource)`` - Returns a boolean based on whether
the resource is enabled or not.
* ``requires(resource [, msg])`` - if the required resource is not
available the ResourceDenied exception is raised.
* ``verify(condition, reason='test failed')``. Use this instead of::
assert condition[, reason]
...
...
@@ -344,6 +356,10 @@ test_support provides the following useful objects:
mode, and it raises ``TestFailed`` on failure instead of
``AssertionError``.
* ``have_unicode`` - true if Unicode is available, false otherwise.
* ``is_jython`` - true if the interpreter is Jython, false otherwise.
* ``TESTFN`` - a string that should always be used as the filename when
you need to create a temp file. Also use ``try``/``finally`` to
ensure that your temp files are deleted before your test completes.
...
...
@@ -359,13 +375,13 @@ test_support provides the following useful objects:
somewhere along sys.path or in the Lib/test tree - see
test_linuxaudiodev.py for an example of its use.
* ``use_large_resources`` - true iff tests requiring large time or space
should be run.
* ``fcmp(x,y)`` - you can call this function to compare two floating
point numbers when you expect them to only be approximately equal
withing a fuzz factor (``test_support.FUZZ``, which defaults to 1e-6).
* ``check_syntax(statement)`` - make sure that the statement is *not*
correct Python syntax.
Python and C statement coverage results are currently available at
...
...
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