Skip to content

Enable function2 test#3083

Merged
charliermarsh merged 1 commit intomainfrom
charlie/formatter-tests
Feb 21, 2023
Merged

Enable function2 test#3083
charliermarsh merged 1 commit intomainfrom
charlie/formatter-tests

Conversation

@charliermarsh
Copy link
Copy Markdown
Member

This is another case in which we have just a minor deviation, and I want to check it in anyway while making a note of it (until we improve the snapshot setup):

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Differences ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Snapshot file: crates/ruff_python_formatter/src/snapshots/ruff_python_formatter__tests__simple_cases__function2.py.snap
Snapshot: simple_cases/function2.py
Source: crates/ruff_python_formatter/src/lib.rs:103
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Expression: adjust_quotes(formatted.print()?.as_code())
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
-old snapshot
+new results
────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
    3     3 │ ) -> A:
    4     4 │     with cache_dir():
    5     5 │         if something:
    6     6 │             result = CliRunner().invoke(
    7       │-                black.main, [str(src1), str(src2), "--diff", "--check"]
          7 │+                black.main,
          8 │+                [str(src1), str(src2), "--diff", "--check"],
    8     9 │             )
    9    10 │     limited.append(-limited.pop())  # negate top
   10    11 │     return A(
   11    12 │         very_long_argument_name1=very_long_value_for_the_argument,
────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
To update snapshots run `cargo insta review`

@charliermarsh charliermarsh force-pushed the charlie/formatter-tests branch 2 times, most recently from d84a244 to 2030ce5 Compare February 21, 2023 04:33
@charliermarsh charliermarsh enabled auto-merge (squash) February 21, 2023 04:33
@charliermarsh charliermarsh force-pushed the charlie/formatter-tests branch from 2030ce5 to af4d2dd Compare February 21, 2023 04:34
@charliermarsh charliermarsh merged commit a6eb60c into main Feb 21, 2023
@charliermarsh charliermarsh deleted the charlie/formatter-tests branch February 21, 2023 04:37
charliermarsh added a commit that referenced this pull request Feb 23, 2023
I manually changed these in #3080 and #3083 to get the tests passing (with notes around the deviations) -- but that's no longer necessary, now that we have proper testing that takes deviations into account.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant