sdpython / cpyquickhelper

Compare 558d934 ... +1 ... 66f67af

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.


@@ -162,7 +162,7 @@
Loading
162 162
        elif self._impl == 'c':
163 163
            sys.setprofile(_profiling_log_event)
164 164
        else:
165 -
            raise ValueError(
165 +
            raise ValueError(  # pragma: no cover
166 166
                "Unexpected value for impl=%r." % self._impl)
167 167
168 168
    def _restore_profiler(self):
@@ -202,8 +202,9 @@
Loading
202 202
        log them.
203 203
        """
204 204
        if self._copy_cache:
205 -
            raise RuntimeError(
206 -
                "Profiling cache being copied. Increase the size of the cache.")
205 +
            raise RuntimeError(  # pragma: no cover
206 +
                "Profiling cache being copied. "
207 +
                "Increase the size of the cache.")
207 208
        self._copy_cache = True
208 209
        if self._buffer is None:
209 210
            ptr = self._cache_copy.__array_interface__[  # pylint: disable=E1101
@@ -259,10 +260,8 @@
Loading
259 260
        """
260 261
        if arg is None:
261 262
            if f_back:
262 -
                if frame.f_back is None:
263 -
                    name = ''
264 -
                else:
265 -
                    name = frame.f_back.f_code.co_name
263 +
                name = ('' if frame.f_back is None else
264 +
                        frame.f_back.f_code.co_name)
266 265
            else:
267 266
                name = frame.f_code.co_name
268 267
            return name
@@ -280,10 +279,8 @@
Loading
280 279
        """
281 280
        if arg is None:
282 281
            if f_back:
283 -
                if frame.f_back is None:
284 -
                    name = ''
285 -
                else:
286 -
                    name = frame.f_back.f_code.co_filename
282 +
                name = ('' if frame.f_back is None else
283 +
                        frame.f_back.f_code.co_filename)
287 284
            else:
288 285
                name = frame.f_code.co_filename
289 286
            return clean_name(name)
@@ -384,7 +381,7 @@
Loading
384 381
        Starts the profiling without enabling it.
385 382
        """
386 383
        if self._started:
387 -
            raise RuntimeError(
384 +
            raise RuntimeError(  # pragma: no cover
388 385
                "The profiler was already started. It cannot be done again.")
389 386
        self._frames[0] = inspect.currentframe()
390 387
        self._started = True
@@ -396,7 +393,7 @@
Loading
396 393
        Stops the unstarted profiling.
397 394
        """
398 395
        if not self._started:
399 -
            raise RuntimeError(
396 +
            raise RuntimeError(  # pragma: no cover
400 397
                "The profiler was not started. It must be done first.")
401 398
        self._buffer.log_event(-1, -1, 101, 0, 0)
402 399
        self._started = False

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
cpyquickhelper +1.35% 97.64%
Project Totals (13 files) 97.64%
Loading