By default,
nose2
looks for modules whose names start with the following prefix:test
run
unittest
By default,
nose2
loads tests from all the subclasses of the following class:unittest.Test
unittest.TestCase
unittest.RunTest
The
setUp
method in a subclass ofunittest.TestCase
:Is executed before each test method runs.
Is executed only once before all the tests start their execution.
Is executed only once after all the tests finish their execution.
The
tearDown
method in a subclass ofunittest.TestCase
:Is executed after each test method runs.
Is executed before each test method runs.
Is executed after a test method only when it fails.
If we declare a
get_accept_content_type_headers
method within a subclass ofunittest.TestCase
, by default,nose2
:Will load this method as a test.
Will load this method as the
setUp
method for each test.Won't load this method as a test.
Argentina
Australia
Austria
Belgium
Brazil
Bulgaria
Canada
Chile
Colombia
Cyprus
Czechia
Denmark
Ecuador
Egypt
Estonia
Finland
France
Germany
Great Britain
Greece
Hungary
India
Indonesia
Ireland
Italy
Japan
Latvia
Lithuania
Luxembourg
Malaysia
Malta
Mexico
Netherlands
New Zealand
Norway
Philippines
Poland
Portugal
Romania
Russia
Singapore
Slovakia
Slovenia
South Africa
South Korea
Spain
Sweden
Switzerland
Taiwan
Thailand
Turkey
Ukraine
United States