1.a “syntaxerror” when an error is reported is a grammatical error
python---exception handing and testing
1.common types of anomalies
https://blog.csdn.net/likunkun__/article/details/81916269
2.how to set up a program , let it execute and throw an exceptionpython---exception handing and testing
3. if nothing is added after except ,any exception will be caught, and if it is added,only the exception written will be caught
5.“fininal” executes this program regardless of whether an exception occurs
for example, the following figure prevents program problems from causing files to be opened all the time regardless of whether the program has problems or not add"fininal"
python---exception handing and testing
5 add an exception manually by yourself
4. python---exception handing and testing
5.“try” is to execte code that may have an exception, and “expect” is to catch an exception,
5. you can write more than one “except”,and finally write an “expect” to catch all exceptions, and finally if you need to write an last
6. finally is code for releasing resources ,typically database code and file codepython---exception handing and testing
7. python---exception handing and testing
8. how to test
9. this is a written programpython---exception handing and testing
10. this is a test case
11. write test cases into another file
12. import test module — unittest
13. write our tests into a method, preferably starting with “test”
14. the following code means that the current file is runningpython---exception handing and testing
15. if the method defined at the begining of “test” is not instantiated in the test, the execution is directly invoked
16.
17. testing a class
18. python---exception handing and testing
19. python---exception handing and testing
20. python---exception handing and testing
21. python---exception handing and testing
22. python---exception handing and testing
23. quantities defined by setup functions in test are default for all other functions
24. python---exception handing and testing
25.basic concepts of unit testing
python---exception handing and testing
26.basic organization of unit testing
python---exception handing and testing
python---exception handing and testing
1.write in notepad and run in cmd
python---exception handing and testing
python---exception handing and testing
25. what are the commonly used assertion method?
26. python---exception handing and testing
27. python---exception handing and testing
28. how to standardize writing in practical development python---exception handing and testing
29. python---exception handing and testing
30. python---exception handing and testing
31. the “setup” function places some initialization contents, specifically the data needed for the next test
32. python---exception handing and testing
33. using the tearDown function, you can close or delete certain functions and release resources
python---exception handing and testing

  1. summarypython---exception handing and testing

相关文章: