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
f47e226f
Kaydet (Commit)
f47e226f
authored
May 24, 2014
tarafından
Claude Paroz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Moved some imports in runtests.py
üst
dbb48d2b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
13 deletions
+6
-13
runtests.py
tests/runtests.py
+6
-13
No files found.
tests/runtests.py
Dosyayı görüntüle @
f47e226f
#!/usr/bin/env python
#!/usr/bin/env python
from
__future__
import
division
import
logging
import
logging
from
optparse
import
OptionParser
import
os
import
os
import
shutil
import
shutil
import
subprocess
import
subprocess
...
@@ -11,6 +10,11 @@ import warnings
...
@@ -11,6 +10,11 @@ import warnings
import
django
import
django
from
django
import
contrib
from
django
import
contrib
from
django.apps
import
apps
,
AppConfig
from
django.conf
import
settings
from
django.db
import
connection
from
django.test
import
TransactionTestCase
,
TestCase
from
django.test.utils
import
get_runner
from
django.utils.deprecation
import
RemovedInDjango19Warning
,
RemovedInDjango20Warning
from
django.utils.deprecation
import
RemovedInDjango19Warning
,
RemovedInDjango20Warning
from
django.utils._os
import
upath
from
django.utils._os
import
upath
from
django.utils
import
six
from
django.utils
import
six
...
@@ -57,7 +61,6 @@ ALWAYS_INSTALLED_APPS = [
...
@@ -57,7 +61,6 @@ ALWAYS_INSTALLED_APPS = [
def
get_test_modules
():
def
get_test_modules
():
from
django.contrib.gis.tests.utils
import
HAS_SPATIAL_DB
from
django.contrib.gis.tests.utils
import
HAS_SPATIAL_DB
from
django.db
import
connection
modules
=
[]
modules
=
[]
discovery_paths
=
[
discovery_paths
=
[
(
None
,
RUNTESTS_DIR
),
(
None
,
RUNTESTS_DIR
),
...
@@ -83,15 +86,10 @@ def get_test_modules():
...
@@ -83,15 +86,10 @@ def get_test_modules():
def
get_installed
():
def
get_installed
():
from
django.apps
import
apps
return
[
app_config
.
name
for
app_config
in
apps
.
get_app_configs
()]
return
[
app_config
.
name
for
app_config
in
apps
.
get_app_configs
()]
def
setup
(
verbosity
,
test_labels
):
def
setup
(
verbosity
,
test_labels
):
from
django.apps
import
apps
,
AppConfig
from
django.conf
import
settings
from
django.test
import
TransactionTestCase
,
TestCase
print
(
"Testing against Django installed in '
%
s'"
%
os
.
path
.
dirname
(
django
.
__file__
))
print
(
"Testing against Django installed in '
%
s'"
%
os
.
path
.
dirname
(
django
.
__file__
))
# Force declaring available_apps in TransactionTestCase for faster tests.
# Force declaring available_apps in TransactionTestCase for faster tests.
...
@@ -171,8 +169,6 @@ def setup(verbosity, test_labels):
...
@@ -171,8 +169,6 @@ def setup(verbosity, test_labels):
def
teardown
(
state
):
def
teardown
(
state
):
from
django.conf
import
settings
try
:
try
:
# Removing the temporary TEMP_DIR. Ensure we pass in unicode
# Removing the temporary TEMP_DIR. Ensure we pass in unicode
# so that it will successfully remove temp trees containing
# so that it will successfully remove temp trees containing
...
@@ -188,12 +184,10 @@ def teardown(state):
...
@@ -188,12 +184,10 @@ def teardown(state):
def
django_tests
(
verbosity
,
interactive
,
failfast
,
test_labels
):
def
django_tests
(
verbosity
,
interactive
,
failfast
,
test_labels
):
from
django.conf
import
settings
state
=
setup
(
verbosity
,
test_labels
)
state
=
setup
(
verbosity
,
test_labels
)
extra_tests
=
[]
extra_tests
=
[]
# Run the test suite, including the extra validation tests.
# Run the test suite, including the extra validation tests.
from
django.test.utils
import
get_runner
if
not
hasattr
(
settings
,
'TEST_RUNNER'
):
if
not
hasattr
(
settings
,
'TEST_RUNNER'
):
settings
.
TEST_RUNNER
=
'django.test.runner.DiscoverRunner'
settings
.
TEST_RUNNER
=
'django.test.runner.DiscoverRunner'
TestRunner
=
get_runner
(
settings
)
TestRunner
=
get_runner
(
settings
)
...
@@ -313,7 +307,6 @@ def paired_tests(paired_test, options, test_labels):
...
@@ -313,7 +307,6 @@ def paired_tests(paired_test, options, test_labels):
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
from
optparse
import
OptionParser
usage
=
"
%
prog [options] [module module module ...]"
usage
=
"
%
prog [options] [module module module ...]"
parser
=
OptionParser
(
usage
=
usage
)
parser
=
OptionParser
(
usage
=
usage
)
parser
.
add_option
(
parser
.
add_option
(
...
...
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