... lass AnimalTestCase ( TestCase ): def setUp ( self ): Animal . objects . create ( name = "cat" , sound = "meow" ) def test_animals_can_speak ( self ): """Animals that can speak are correctly identified""" cat = Animal . objects . get ( name = "cat" ) se ... ス、テストメソッドへのドット区切りの Python パスを指定します。たとえば、以下のように指定します。 # Run all the tests in the animals.tests module $ ./manage.py test animals.tests # Run all the tests found within the 'animals' package $ ./manage.py test an ... imals # Run just one test case class $ ./manage.py test animals.tests.AnimalTestCase # Run just one test method $ ./manage.py test animals.tests.AnimalTestCase.test_animals_can_speak ディ ... ... lass AnimalTestCase ( TestCase ): def setUp ( self ): Animal . objects . create ( name = "cat" , sound = "meow" ) def test_animals_can_speak ( self ): """Animals that can speak are correctly identified""" cat = Animal . objects . get ( name = "cat" ) se ... ス、テストメソッドへのドット区切りの Python パスを指定します。たとえば、以下のように指定します。 # Run all the tests in the animals.tests module $ ./manage.py test animals.tests # Run all the tests found within the 'animals' package $ ./manage.py test an ... imals # Run just one test case class $ ./manage.py test animals.tests.AnimalTestCase # Run just one test method $ ./manage.py test animals.tests.AnimalTestCase.test_animals_can_speak ディ ... ... res = [ "mammals.json" , "birds" ] def setUp ( self ): # Test definitions as before. call_setup_methods () def test_fluffy_animals ( self ): # A test that uses the fixtures. call_some_test_code () 具体的には、以下のことが起こります。 setUpClass() の実行 ... ... res = [ "mammals.json" , "birds" ] def setUp ( self ): # Test definitions as before. call_setup_methods () def test_fluffy_animals ( self ): # A test that uses the fixtures. call_some_test_code () 具体的には、以下のことが起こります。 setUpClass() の実行 ... 2026年10月08日