• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 19377500035

14 Nov 2025 09:01PM UTC coverage: 80.078% (-0.2%) from 80.29%
19377500035

Pull #22890

github

web-flow
Merge 90397d509 into 42e1ebd41
Pull Request #22890: Updated all python subsystem constraints to 3.14

4 of 5 new or added lines in 5 files covered. (80.0%)

214 existing lines in 14 files now uncovered.

77661 of 96982 relevant lines covered (80.08%)

3.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.67
/src/python/pants/core/goals/fmt_integration_test.py
1
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3

4
import re
1✔
5

6
from pants.testutil.pants_integration_test import ensure_daemon, run_pants
1✔
7
from pants.util.contextutil import overwrite_file_content
1✔
8
from pants.util.dirutil import read_file
1✔
9

10

11
@ensure_daemon
1✔
12
def test_fmt_then_edit(use_pantsd: bool) -> None:
1✔
13
    f = "testprojects/src/python/hello/greet/greet.py"
1✔
14

15
    def run() -> None:
1✔
16
        run_pants(
1✔
17
            [
18
                "--backend-packages=['pants.backend.python', 'pants.backend.python.lint.black']",
19
                "fmt",
20
                f,
21
            ],
22
            use_pantsd=use_pantsd,
23
        ).assert_success()
24

25
    # Run once to start up, and then capture the file content.
26
    run()
1✔
UNCOV
27
    good_content = read_file(f)
×
28

29
    # Edit the file.
UNCOV
30
    with overwrite_file_content(f, lambda c: re.sub(b"def greet", b"def  greet", c)):
×
UNCOV
31
        assert good_content != read_file(f)
×
32

33
        # Re-run and confirm that the file was fixed.
UNCOV
34
        run()
×
UNCOV
35
        assert good_content == read_file(f)
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc