twisted / twisted

@@ -54,7 +54,9 @@
Loading
54 54
    skip = "Release toolchain only supported on POSIX."
55 55
56 56
# This should match the GitHub Actions environment used by pre-comnmit.ci to push changes to the auto-updated branches.
57 -
PRECOMMIT_CI_ENVIRON = {"GITHUB_ACTOR": "pre-commit-ci[bot]"}
57 +
PRECOMMIT_CI_ENVIRON = {"GITHUB_HEAD_REF": "pre-commit-ci-update-config"}
58 +
# This should match the GHA environment for non pre-commit.ci PRs.
59 +
GENERIC_CI_ENVIRON = {"GITHUB_HEAD_REF": "1234-some-branch-name"}
58 60
59 61
60 62
class ExternalTempdirTestCase(TestCase):
@@ -965,6 +967,8 @@
Loading
965 967
966 968
        runCommand(["git", "clone", self.origin.path, self.repo.path])
967 969
        _gitConfig(self.repo)
970 +
        # Inject a rigged environment to have full control over the test execution.
971 +
        self.patch(os, "environ", GENERIC_CI_ENVIRON)
968 972
969 973
    def test_noArgs(self):
970 974
        """

@@ -457,7 +457,7 @@
Loading
457 457
        @param args: The arguments for the format string.
458 458
        """
459 459
        s = str(format)
460 -
        assert isinstance(s, type(""))
460 +
        assert isinstance(s, str)
461 461
        if args:
462 462
            self._stream.write(s % args)
463 463
        else:

@@ -582,7 +582,7 @@
Loading
582 582
                self._print("Release branch with no newsfragments, all good.")
583 583
                sys.exit(0)
584 584
585 -
        if os.environ.get("GITHUB_ACTOR", "") == "pre-commit-ci[bot]":
585 +
        if os.environ.get("GITHUB_HEAD_REF", "") == "pre-commit-ci-update-config":
586 586
            # The run was triggered by pre-commit.ci.
587 587
            if newsfragments:
588 588
                self._print(

@@ -31,7 +31,7 @@
Loading
31 31
        """
32 32
        self.assertEqual(type(self.path.__str__()), str)
33 33
34 -
    def test_mutabilityWithText(self, stringType=type("")):
34 +
    def test_mutabilityWithText(self, stringType=str):
35 35
        """
36 36
        Setting attributes on L{urlpath.URLPath} should change the value
37 37
        returned by L{str}.

@@ -344,7 +344,7 @@
Loading
344 344
    if not isinstance(domain, bytes):
345 345
        raise TypeError(
346 346
            "Expected {} or {} but found {!r} of type {}".format(
347 -
                type(b"").__name__, type("").__name__, domain, type(domain)
347 +
                bytes.__name__, str.__name__, domain, type(domain)
348 348
            )
349 349
        )
350 350
    return domain
Files Coverage
src/twisted 90.64%
Project Totals (829 files) 90.64%
macos-3.6
Build #20210728.15 -
windows-3.9
Build #20210728.15 -
macos-3.8
Build #20210728.15 -
windows-3.8
Build #20210728.15 -
windows-3.7
Build #20210728.15 -
windows-3.6
Build #20210728.15 -
windows-3.8
Build #20210728.15 -
macos-3.9
Build #20210728.15 -
windows-3.9
Build #20210728.15 -
windows-3.6
Build #20210728.15 -
lnx-3.6.7-nodeps-withcov-posix
Build #1074863529 -
lnx-pypy-3.7-alldeps-withcov-posix
Build #1074863529 -
lnx-3.6-alldeps-withcov-posix
Build #1074863529 -
lnx-3.8-alldeps-withcov-posix
Build #1074863529 -
lnx-3.6-alldeps-withcov-posix-noipv6
Build #1074863529 -
lnx-3.9-alldeps-withcov-posix
Build #1074863529 -
macos-3.7
Build #20210728.15 -
lnx-3.7-alldeps-withcov-posix
Build #1074863529 -
windows-3.7
Build #20210728.15 -
lnx-3.10.0-beta.4-alldeps-withcov-posix
Build #1074863529 -
1
#
2
# For documentation: https://docs.codecov.io/docs/codecovyml-reference
3
# Twisted settings: https://codecov.io/gh/twisted/twisted/settings/yaml
4
#
5
# We want 100% coverage for new patches to make sure we are always increasing
6
# the coverage.
7
#
8
codecov:
9
  require_ci_to_pass: yes
10
  notify:
11
    # We have at least 10 builds in GitHub Actions and 12 in Azure
12
    # and lint + mypy + docs + ReadTheDocs
13
    after_n_builds: 15
14
    wait_for_ci: yes
15

16
coverage:
17
  precision: 2
18
  round: down
19
  status:
20
    patch:
21
      default:
22
        # New code should have 100% CI coverage as the minimum
23
        # quality assurance measurement.
24
        # If there is a good reason for new code not to have coverage,
25
        # add inline pragma comments.
26
        target: 100%
27
    project:
28
      default:
29
        # Temporary allow for a bit of slack in overall code coverage due to
30
        # swinging coverage that is not triggered by changes in a PR.
31
        # See: https://twistedmatrix.com/trac/ticket/10170
32
        threshold: 0.02%
33

34

35
# We don't want to receive general PR comments about coverage.
36
# We have the commit status checks and that should be enough.
37
# See https://docs.codecov.io/docs/pull-request-comments
38
comment: false
39

40
# See https://docs.codecov.io/docs/github-checks
41
github_checks:
42
  # We want codecov to send inline PR comments for missing coverage.
43
  annotations: true
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