What is the meaning of verbosity=2 in selenium script
Python's unittest module provides a testing framework, as long as we write a class that inherits unittest.TestCase, initializing it with setUp and cleaning it with tearDown.
The main functions used are:
Failedinfo indicates that the print message failedinfo is not valid and is an optional parameter.
Self.fail ([msg]) will cause the test to fail unconditionally and is not recommended.
Self.assertEqual (value1, value2, failedinfo) # asserts value1 = = value2
Self.assertTrue (expression, failedinfo) # asserts that value is true
Self.assertFalse (expression, failedinfo) # asserts that value is false
Reference: http://canlynet.iteye.com/blog/1671750
Unittest.TextTestRunner (verbosity=2) .run (suite) runs the use case. The TextTestRunner class outputs the result of the use case execution in the form of text. The default value is 1, which does not restrict the complete result, that is, the single use case successfully outputs'.', the failure output is' unittest, and the error output 'error output. The complete information will be output. Verbosity=2 refers to the level of detail of the test result output, with a level of 0-6. For more information, please see Python27\ Lib\ unittest\ runner.py source code.
That's it first, and I'll add it later!