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
906dc852
Kaydet (Commit)
906dc852
authored
Şub 25, 2013
tarafından
Carl Meyer
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #19854 -- Turn Django's own Selenium tests off by default.
üst
6d52bcbb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
21 deletions
+11
-21
tests.py
django/contrib/admin/tests.py
+2
-2
unit-tests.txt
docs/internals/contributing/writing-code/unit-tests.txt
+3
-12
i18n.py
tests/regressiontests/views/tests/i18n.py
+2
-2
runtests.py
tests/runtests.py
+4
-5
No files found.
django/contrib/admin/tests.py
Dosyayı görüntüle @
906dc852
...
...
@@ -10,8 +10,8 @@ class AdminSeleniumWebDriverTestCase(LiveServerTestCase):
@classmethod
def
setUpClass
(
cls
):
if
os
.
environ
.
get
(
'DJANGO_SKIP
_SELENIUM_TESTS'
,
False
):
raise
SkipTest
(
'Selenium tests
skipped by explicit request
'
)
if
not
os
.
environ
.
get
(
'DJANGO
_SELENIUM_TESTS'
,
False
):
raise
SkipTest
(
'Selenium tests
not requested
'
)
try
:
cls
.
selenium
=
import_by_path
(
cls
.
webdriver_class
)()
except
Exception
as
e
:
...
...
docs/internals/contributing/writing-code/unit-tests.txt
Dosyayı görüntüle @
906dc852
...
...
@@ -128,21 +128,12 @@ Running the Selenium tests
Some admin tests require Selenium 2, Firefox and Python >= 2.6 to work via a
real Web browser. To allow those tests to run and not be skipped, you must
install the selenium_ package (version > 2.13) into your Python path.
Then, run the tests normally, for example:
.. code-block:: bash
./runtests.py --settings=test_sqlite admin_inlines
If you have Selenium installed but for some reason don't want to run these tests
(for example to speed up the test suite), use the ``--skip-selenium`` option
of the test runner.
install the selenium_ package (version > 2.13) into your Python path and run
the tests with the ``--selenium`` option:
.. code-block:: bash
./runtests.py --settings=test_sqlite --s
kip-s
elenium admin_inlines
./runtests.py --settings=test_sqlite --selenium admin_inlines
.. _running-unit-tests-dependencies:
...
...
tests/regressiontests/views/tests/i18n.py
Dosyayı görüntüle @
906dc852
...
...
@@ -177,10 +177,10 @@ class JsI18NTestsMultiPackage(TestCase):
javascript_quote
(
'este texto de app3 debe ser traducido'
))
skip_selenium
=
os
.
environ
.
get
(
'DJANGO_SKIP
_SELENIUM_TESTS'
,
False
)
skip_selenium
=
not
os
.
environ
.
get
(
'DJANGO
_SELENIUM_TESTS'
,
False
)
@unittest.skipIf
(
skip_selenium
,
'Selenium tests
skipped by explicit request
'
)
@unittest.skipIf
(
skip_selenium
,
'Selenium tests
not requested
'
)
@unittest.skipUnless
(
firefox
,
'Selenium not installed'
)
class
JavascriptI18nTests
(
LiveServerTestCase
):
urls
=
'regressiontests.views.urls'
...
...
tests/runtests.py
Dosyayı görüntüle @
906dc852
...
...
@@ -302,10 +302,9 @@ if __name__ == "__main__":
'LiveServerTestCase) is expected to run from. The default value '
'is localhost:8081.'
)
parser
.
add_option
(
'--s
kip-selenium'
,
action
=
'store_true'
,
dest
=
'skip_
selenium'
,
'--s
elenium'
,
action
=
'store_true'
,
dest
=
'
selenium'
,
default
=
False
,
help
=
'Skip running Selenium tests even it Selenium itself is '
'installed. By default these tests are not skipped.'
)
help
=
'Run the Selenium tests as well (if Selenium is installed)'
)
options
,
args
=
parser
.
parse_args
()
if
options
.
settings
:
os
.
environ
[
'DJANGO_SETTINGS_MODULE'
]
=
options
.
settings
...
...
@@ -318,8 +317,8 @@ if __name__ == "__main__":
if
options
.
liveserver
is
not
None
:
os
.
environ
[
'DJANGO_LIVE_TEST_SERVER_ADDRESS'
]
=
options
.
liveserver
if
options
.
s
kip_s
elenium
:
os
.
environ
[
'DJANGO_S
KIP_S
ELENIUM_TESTS'
]
=
'1'
if
options
.
selenium
:
os
.
environ
[
'DJANGO_SELENIUM_TESTS'
]
=
'1'
if
options
.
bisect
:
bisect_tests
(
options
.
bisect
,
options
,
args
)
...
...
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