httprunner source

1, python dictionary get function returns the value of the specified key, designated key does not exist, a default value is returned

get(key,default=None)

2, os.getcwd returns the current working directory

3, untils modules: an interface into the encapsulated untils tools can be called directly

4, format string format, or using {}: A string representing the location

5, insert () function is used to specify the object into the specified position in the list.

list.insert(index,object)

6, testcase / testsuite run method has its own, generally introduced TextTestRunner html format for better control of the test results, TextTestRunner.run method still performed last run (case) / run (suite)

7, enumerate one may traverse the object (list, tuple or string) into a sequence index, and the index data are also listed

8, setattr set the attribute values, the attribute need not be present

setattr (str, name, value) #name property name, value to set a value of the attribute

9, get_args obtain a function of all the parameters

10, pop method removes the dictionary and corresponding to a given key Key value, the return value is deleted, key value must be given, otherwise default value

pop(key[,default])

  

Guess you like

Origin www.cnblogs.com/CXMS/p/12482242.html