Skip to content

add regression test for move a function to an existed file. - #5096

Closed
asukaminato0721 wants to merge 1 commit into
meta:mainfrom
asukaminato0721:5094
Closed

asukaminato0721 wants to merge 1 commit into
meta:mainfrom
asukaminato0721:5094

Conversation

@asukaminato0721

@asukaminato0721 asukaminato0721 commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

add regression test for #5094 move a function to an existed file.

  • I am a human, and I fully understand the code I am submitting.

Test Plan

add test.

@meta-cla meta-cla Bot added the cla signed label Oct 4, 2026
@github-actions github-actions Bot added the size/s label Oct 4, 2026
@asukaminato0721 asukaminato0721 changed the title add regression test for extract a function to an existed file. add regression test for move a function to an existed file. Oct 4, 2026
@meta-codesync

meta-codesync Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

This pull request has been imported. If you are a Meta employee, you can view this in D123267711. (Because this pull request was imported automatically, there will not be any future comments.)

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@github-actions
github-actions Bot requested a review from kinto0 October 4, 2026 11:01
// Known bug: Unopened sibling files are not offered as move destinations.
#[test]
#[should_panic(expected = "expected an action for the unopened sibling")]
fn move_module_member_to_unopened_sibling() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unopened? or nonexistent?

let source_path = temp.path().join("a.py");
let target_path = temp.path().join("b.py");
fs::write(&source_path, source).unwrap();
fs::write(&target_path, target).unwrap();

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unopened, here write

@asukaminato0721
asukaminato0721 requested a review from kinto0 October 8, 2026 03:03

@stroxler stroxler left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@meta-codesync meta-codesync Bot closed this in 465a2e4 Oct 9, 2026
@meta-codesync meta-codesync Bot added the Merged label Oct 9, 2026
@meta-codesync

meta-codesync Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

This pull request has been merged in 465a2e4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants