cherrypy / cherrypy

@@ -70,6 +70,11 @@
Loading
70 70
            raise StopIteration()
71 71
    next = __next__
72 72
73 +
    def __del__(self):
74 +
        """Close input on descturct."""
75 +
        if hasattr(self.input, 'close'):
76 +
            self.input.close()
77 +
73 78
74 79
def file_generator_limited(fileobj, count, chunk_size=65536):
75 80
    """Yield the given file object in chunks.

@@ -221,8 +221,8 @@
Loading
221 221
        # the favicon in the page handler to be '../favicon.ico',
222 222
        # but then overrode it in config to be './static/dirback.jpg'.
223 223
        self.getPage('/favicon.ico')
224 -
        self.assertBody(open(os.path.join(localDir, 'static/dirback.jpg'),
225 -
                             'rb').read())
224 +
        with open(os.path.join(localDir, 'static/dirback.jpg'), 'rb') as tf:
225 +
            self.assertBody(tf.read())
226 226
227 227
    def test_request_body_namespace(self):
228 228
        self.getPage('/plain', method='POST', headers=[
Files Coverage
cherrypy 79.34%
Project Totals (104 files) 79.34%
1
codecov:
2
  bot: codecov
3
  notify:
4
    require_ci_to_pass: yes
5

6
coverage:
7
  precision: 2
8
  round: down
9
  range: "70...100"
10

11
  status:
12
    # Only consider coverage of the code snippet changed in PR
13
    project: no
14
    patch: yes
15
    changes: no
16

17
parsers:
18
  gcov:
19
    branch_detection:
20
      conditional: yes
21
      loop: yes
22
      method: no
23
      macro: no
24

25
comment:
26
  layout: "header, diff"
27
  behavior: default
28
  require_changes: no
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