<#17639 The `src/python/pants/core/goals/fix_test....
# github-notifications
q
#17639 The `src/python/pants/core/goals/fix_test.py` `test_fixers_first` test is flaky. New issue created by jsirois There appears to be possibility of double stderr output as witnessed here: https://github.com/pantsbuild/pants/actions/runs/3551276740/jobs/5965338439#step:11:308
Copy code
23:45:02.29 [ERROR] Completed: Run Pytest - src/python/pants/core/goals/fix_test.py:tests - failed (exit code 1).
============================= test session starts ==============================
collecting ... collected 12 items

src/python/pants/core/goals/fix_test.py::test_summary PASSED             [  8%]
src/python/pants/core/goals/fix_test.py::test_skip_formatters PASSED     [ 16%]
src/python/pants/core/goals/fix_test.py::test_fixers_first FAILED        [ 25%]
src/python/pants/core/goals/fix_test.py::test_only PASSED                [ 33%]
src/python/pants/core/goals/fix_test.py::test_no_targets PASSED          [ 41%]
src/python/pants/core/goals/fix_test.py::test_message_lists_added_files PASSED [ 50%]
src/python/pants/core/goals/fix_test.py::test_message_lists_removed_files PASSED [ 58%]
src/python/pants/core/goals/fix_test.py::test_message_lists_files PASSED [ 66%]
src/python/pants/core/goals/fix_test.py::test_default_single_partition_partitioner[KitchenSingleUtensilFieldSet-field_sets0] PASSED [ 75%]
src/python/pants/core/goals/fix_test.py::test_default_single_partition_partitioner[KitchenMultipleUtensilsFieldSet-field_sets1] PASSED [ 83%]
src/python/pants/core/goals/fix_test.py::test_streaming_output_changed PASSED [ 91%]
src/python/pants/core/goals/fix_test.py::test_streaming_output_not_changed PASSED [100%]

=================================== FAILURES ===================================
______________________________ test_fixers_first _______________________________

    def test_fixers_first() -> None:
        rule_runner = fix_rule_runner(
            target_types=[FortranTarget, SmalltalkTarget],
            # NB: Order is important here
            request_types=[FortranFmtRequest, FortranFixRequest],
        )
    
        write_files(rule_runner)
    
        stderr = run_fix(rule_runner, target_specs=["::"])
    
        # NB Since both rules have the same body, if the fixer runs first, it'll make changes. Then the
        # formatter will have nothing to change.
>       assert stderr == dedent(
            """\
    
            + FortranConditionallyDidChange made changes.
            ✓ FortranFormatter made no changes.
            """
        )
E       AssertionError: assert equals failed
E         '\n+ FortranConditionallyDidCha  '\n+ FortranConditionallyDidCha 
E         nge made changes.\n✓ FortranFor  nge made changes.\n✓ FortranFor 
E         matter made no changes.\n\n✓ Fo  matter made no changes.\n'      
E         rtranConditionallyDidChange mad                                  
E         e no changes.\n✓ FortranFormatt                                  
E         er made no changes.\n'

src/python/pants/core/goals/fix_test.py:342: AssertionError
- generated xml file: /tmp/pants-sandbox-oaXEIM/src.python.pants.core.goals.fix_test.py.tests.xml -


=========================== short test summary info ============================
FAILED src/python/pants/core/goals/fix_test.py::test_fixers_first - Assertion...
========================= 1 failed, 11 passed in 4.06s =========================
pantsbuild/pants