0

という名前のファイルに最小限のテストケースがありますtestDummy.py/MyApp/MyApp/デフォルトの と並んでsettings.py

from django.test import TestCase

class DummyTests(TestCase):

    def setUp(self):
        print("Setup")

    def tearDown(self):
        print("Teardown")

    def test_noddy(self):

        self.assertEqual(1, 2)

を実行するmanage.py test -v 2と...

Creating test database for alias 'default' ('test_myapp')...
Creating tables ...
Creating table django_content_type
Creating table contenttypes_concretemodel
...
Creating table myapp_login_audit
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)
test_get_for_concrete_model (django.contrib.contenttypes.tests.ContentTypesTests) ... ok
...
test_shortcut_view (django.contrib.contenttypes.tests.ContentTypesTests) ... ok
test_shortcut_view_with_broken_get_absolute_url (django.contrib.contenttypes.tes
ts.ContentTypesTests) ... ok
test_shortcut_view_without_get_absolute_url (django.contrib.contenttypes.tests.C
ontentTypesTests) ... ok

----------------------------------------------------------------------
Ran 10 tests in 0.389s

OK
Destroying test database for alias 'default' ('test_myapp')...

ただし、常に同じ 10 個のテストが実行されます (いずれも私のものではありません)。もしそうならmanage.py test -v 2 MyApp、0回のテストを実行します。

私は何が欠けていますか?

(Python3、ジャンゴ 1.6)

4

0 に答える 0