PromyLOPh / crocoite
Showing 1 of 1 files from the diff.

@@ -114,24 +114,41 @@
Loading
114 114
    await tab.Network.enable ()
115 115
    await tab.Page.navigate (url='http://localhost:8080')
116 116
117 -
    method, req = await tab.get ()
118 -
    assert method == tab.Network.requestWillBeSent
119 -
120 -
    method, resp = await tab.get ()
121 -
    assert method == tab.Network.responseReceived
122 -
    assert resp['requestId'] == req['requestId']
123 -
124 -
    method, dataRecv = await tab.get ()
125 -
    assert method == tab.Network.dataReceived
126 -
    assert dataRecv['dataLength'] == len (docBody)
127 -
    assert dataRecv['requestId'] == req['requestId']
128 -
129 -
    method, finish = await tab.get ()
130 -
    assert method == tab.Network.loadingFinished
131 -
    assert finish['requestId'] == req['requestId']
132 -
133 -
    body = await tab.Network.getResponseBody (requestId=req['requestId'])
134 -
    assert body['body'] == docBody
117 +
    haveRequest = False
118 +
    haveResponse = False
119 +
    haveData = False
120 +
    haveFinished = False
121 +
    haveBody = False
122 +
    req = None
123 +
    resp = None
124 +
    while not haveBody:
125 +
        method, data = await tab.get ()
126 +
127 +
        # it can be either of those two in no specified order
128 +
        if method in (tab.Network.requestWillBeSent, tab.Network.requestWillBeSentExtraInfo) and not haveResponse:
129 +
            if req is None:
130 +
                req = data
131 +
            assert data['requestId'] == req['requestId']
132 +
            haveRequest = True
133 +
        elif method in (tab.Network.responseReceived, tab.Network.responseReceivedExtraInfo) and haveRequest:
134 +
            if resp is None:
135 +
                resp = data
136 +
            assert data['requestId'] == resp['requestId']
137 +
            haveResponse = True
138 +
        elif haveRequest and haveResponse and method == tab.Network.dataReceived:
139 +
            assert data['dataLength'] == len (docBody)
140 +
            assert data['requestId'] == req['requestId']
141 +
            haveData = True
142 +
        elif haveData:
143 +
            assert method == tab.Network.loadingFinished
144 +
            assert data['requestId'] == req['requestId']
145 +
            haveBody = True
146 +
        elif haveFinished:
147 +
            body = await tab.Network.getResponseBody (requestId=req['requestId'])
148 +
            assert body['body'] == docBody
149 +
            haveBody = True
150 +
        else:
151 +
            assert False, (method, req)
135 152
136 153
    await tab.Network.disable ()
137 154
    assert tab.pending == 0
Files Coverage
crocoite 76.18%
Project Totals (20 files) 76.18%
158.1
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
158.2
TRAVIS_PYTHON_VERSION=3.7
TRAVIS_OS_NAME=linux
158.4
TRAVIS_PYTHON_VERSION=3.7-dev
TRAVIS_OS_NAME=linux
158.3
TRAVIS_PYTHON_VERSION=3.6-dev
TRAVIS_OS_NAME=linux
158.5
TRAVIS_PYTHON_VERSION=3.8-dev
TRAVIS_OS_NAME=linux

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading