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
64092a56
Kaydet (Commit)
64092a56
authored
Haz 07, 2009
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
backport r73273
üst
b4347a25
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
test_winreg.py
Lib/test/test_winreg.py
+21
-0
No files found.
Lib/test/test_winreg.py
Dosyayı görüntüle @
64092a56
...
@@ -35,6 +35,27 @@ if test_support.have_unicode:
...
@@ -35,6 +35,27 @@ if test_support.have_unicode:
class
WinregTests
(
unittest
.
TestCase
):
class
WinregTests
(
unittest
.
TestCase
):
remote_name
=
None
remote_name
=
None
def
setUp
(
self
):
# Make sure that the test key is absent when the test
# starts.
self
.
delete_tree
(
HKEY_CURRENT_USER
,
test_key_name
)
def
delete_tree
(
self
,
root
,
subkey
):
try
:
hkey
=
OpenKey
(
root
,
subkey
,
KEY_ALL_ACCESS
)
except
WindowsError
:
# subkey does not exist
return
while
True
:
try
:
subsubkey
=
EnumKey
(
hkey
,
0
)
except
WindowsError
:
# no more subkeys
break
self
.
delete_tree
(
hkey
,
subsubkey
)
CloseKey
(
hkey
)
DeleteKey
(
root
,
subkey
)
def
WriteTestData
(
self
,
root_key
):
def
WriteTestData
(
self
,
root_key
):
# Set the default value for this key.
# Set the default value for this key.
SetValue
(
root_key
,
test_key_name
,
REG_SZ
,
"Default value"
)
SetValue
(
root_key
,
test_key_name
,
REG_SZ
,
"Default value"
)
...
...
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