Python indentation error when documenting the code -
I have the following part of the code in Python.
"" "=== ================================== =============== this file provides the casing around the web test API to start a test and every file ============ ============================= =================== "" "import json, urllib, OS, ConfigParser webPageTestConfigUtils webPageTestConfigUtils import pprint import class WebPageTestProcessor from pprint:" "" ====== ===================== ========================= method of test for Dbluteepiti to offer. takes a URL input for which you test To run Want. =============================== =============== ======= "" "def submitTest (self, url): response = No URL If no: wptUrl = WebPageTestConfigUtils.getConfigValue ( 'runTestURL"? f = json & amp; url = "') + url + "& amp; run = 3 and video = 1 & amp; web10 = 0 & amp; fvonly = 1 & amp; mv = 1 & amp; private = 1 and Area = us_east_wptdriver: Chrome.DSL" again sponsor = json.load (urllib.urlopen (wptUrl)) return response [ "data"] [ "testId"] "" "====================== =============================== method to check the status of the test went presents. Takes a test ID as input ========================================= =========? ==== "" "def checkTestStatus (self, testId): response = does not, then testId No: wptUrl = WebPageTestConfigUtils.getConfigValue ( 'testStatusURL') + 'f = json & amp; test =" + TestId response = json. Load (urllib.urlopen (wptUrl)) return response "" "==================================== the ================== ways to Export to HAR file. Failpth for which the destination takes the file and a testId to get a HAR. Make sure you have the file Is allowed to write. =========================================== ======= ==== "" "def getHarFile (himself, filePath, testId): if (filepath nobody and nobody testId): harUrl = WebPageTestConfigUtils.getConfigValue ( 'harFileURL') + "Test =" + testId urlib ?. urlretrieve (harUrl, filePath) to
I am getting an error
IndentationError: expect a jagged block
"" "========================================== == ======== The method takes the URL as input to submit a test for WPT, for which you want to run the test. ========= =========================================
< P> Why is this error coming up when I correctly indented the code
updated Or as
said, @PM 2Ring, it was meant to say docstring as in the OP with additional information: Comments are considered as empty spaces, and to align There is no need to induce with induction
Even error appears in the form of docstrings is indented.
class WebPageTestProcessor: "" "===== ======================================= Method ======== Method to submit a test URL for WPT as input to Takes not that you want to run the test. ================================================== === "" "DEF submitTest (auto, URL): response = does not do any, if no one does not have URL: wptUrl = WebPageTestConfigUtils.getConfigValue ('runTestURL') + '? F = json & url =" + Url + "& run = 3 and video = 1 & amp; web10 = 0 & amp; fvonly = 1 & amp; mv = 1 & private = 1 more location = us_east_wptdriver: Chrome.DSL" response = json .load (urllib.urlopen (wptUrl)) Return response ["Data"] ["TestId"]
...
Comments
Post a Comment