Skip to content

Commit 0498384

Browse files
xavierdfacebook-github-bot
authored andcommitted
integration: fix test_change_casing_with_untracked on Windows
Summary: In D36914467 (e7918c1), a very subtle change was introduced in the processBothChanged lambda. The path component being used before was the one from the tree, while it is now coming from the inode itself. This change caused the test_change_casing_with_untracked to start failing with: AssertionError: {'DIR2/untracked': '?'} != {'dir2/untracked': '?'} - {'DIR2/untracked': '?'} ? ^^^ + {'dir2/untracked': '?'} ? ^^^ Or in english, the test expected the untracked file to be in the directory DIR2, but is now in the directory dir2. Reading the test itself, and the comment just above the failed assert makes it clear that on Windows, the dir2 directory will be on disk. It thus makes more sense for status to report the untracked file from the dir2 directory instead of from the DIR2 directory. Reviewed By: DurhamG Differential Revision: D37536084 fbshipit-source-id: 02dd592719f41ad0320f065ccfe41dc64d030608
1 parent aa0cd3e commit 0498384

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

eden/integration/hg/update_test.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -666,9 +666,7 @@ def test_change_casing_with_untracked(self) -> None:
666666
)
667667
self.assertEqual(self.read_file("DIR2/untracked"), "untracked")
668668

669-
untrackedPath = (
670-
"DIR2/untracked" if sys.platform == "win32" else "dir2/untracked"
671-
)
669+
untrackedPath = "dir2/untracked"
672670
self.assert_status({untrackedPath: "?"})
673671

674672
def test_update_to_null_with_untracked_directory(self) -> None:

0 commit comments

Comments
 (0)