Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
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
django
Commits
8330b50c
Kaydet (Commit)
8330b50c
authored
Kas 16, 2014
tarafından
Simon Charette
Kaydeden (comit)
Tim Graham
Kas 21, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #23863 -- Made runtests accept the keepdb option.
refs #20550
üst
72729f84
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
runtests.py
tests/runtests.py
+7
-2
No files found.
tests/runtests.py
Dosyayı görüntüle @
8330b50c
...
@@ -198,7 +198,7 @@ def teardown(state):
...
@@ -198,7 +198,7 @@ def teardown(state):
setattr
(
settings
,
key
,
value
)
setattr
(
settings
,
key
,
value
)
def
django_tests
(
verbosity
,
interactive
,
failfast
,
test_labels
):
def
django_tests
(
verbosity
,
interactive
,
failfast
,
keepdb
,
test_labels
):
state
=
setup
(
verbosity
,
test_labels
)
state
=
setup
(
verbosity
,
test_labels
)
extra_tests
=
[]
extra_tests
=
[]
...
@@ -211,6 +211,7 @@ def django_tests(verbosity, interactive, failfast, test_labels):
...
@@ -211,6 +211,7 @@ def django_tests(verbosity, interactive, failfast, test_labels):
verbosity
=
verbosity
,
verbosity
=
verbosity
,
interactive
=
interactive
,
interactive
=
interactive
,
failfast
=
failfast
,
failfast
=
failfast
,
keepdb
=
keepdb
,
)
)
# Catch warnings thrown in test DB setup -- remove in Django 1.9
# Catch warnings thrown in test DB setup -- remove in Django 1.9
with
warnings
.
catch_warnings
():
with
warnings
.
catch_warnings
():
...
@@ -346,6 +347,9 @@ if __name__ == "__main__":
...
@@ -346,6 +347,9 @@ if __name__ == "__main__":
'--failfast'
,
action
=
'store_true'
,
dest
=
'failfast'
,
default
=
False
,
'--failfast'
,
action
=
'store_true'
,
dest
=
'failfast'
,
default
=
False
,
help
=
'Tells Django to stop running the test suite after first failed '
help
=
'Tells Django to stop running the test suite after first failed '
'test.'
)
'test.'
)
parser
.
add_argument
(
'-k'
,
'--keepdb'
,
action
=
'store_true'
,
dest
=
'keepdb'
,
default
=
False
,
help
=
'Tells Django to preserve the test database between runs.'
)
parser
.
add_argument
(
parser
.
add_argument
(
'--settings'
,
'--settings'
,
help
=
'Python path to settings module, e.g. "myproject.settings". If '
help
=
'Python path to settings module, e.g. "myproject.settings". If '
...
@@ -388,6 +392,7 @@ if __name__ == "__main__":
...
@@ -388,6 +392,7 @@ if __name__ == "__main__":
paired_tests
(
options
.
pair
,
options
,
options
.
modules
)
paired_tests
(
options
.
pair
,
options
,
options
.
modules
)
else
:
else
:
failures
=
django_tests
(
options
.
verbosity
,
options
.
interactive
,
failures
=
django_tests
(
options
.
verbosity
,
options
.
interactive
,
options
.
failfast
,
options
.
modules
)
options
.
failfast
,
options
.
keepdb
,
options
.
modules
)
if
failures
:
if
failures
:
sys
.
exit
(
bool
(
failures
))
sys
.
exit
(
bool
(
failures
))
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