Skip to content

Commit

Permalink
print actual vs expected in all readdir tests
Browse files Browse the repository at this point in the history
Summary: This was missing in some tests and that made it difficult to debug.

Reviewed By: kmancini

Differential Revision: D59654774

fbshipit-source-id: 75f221fd98876c6e1a23141f5f43820526ae82f7
  • Loading branch information
MichaelCuevas authored and facebook-github-bot committed Jul 18, 2024
1 parent 4066cfb commit a92eb43
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions eden/integration/readdir_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,8 @@ def test_readdir(self) -> None:
sync=SyncBehavior(),
)
)
print(f"expected: \n{expected}")
print(f"actual: \n{actual_result}")
self.assertEqual(
expected,
actual_result,
Expand All @@ -912,6 +914,8 @@ def test_readdir(self) -> None:
sync=SyncBehavior(),
)
)
print(f"expected: \n{expected}")
print(f"actual: \n{actual}")
self.assertEqual(expected, actual)

# non existent directory
Expand All @@ -933,6 +937,8 @@ def test_readdir(self) -> None:
sync=SyncBehavior(),
)
)
print(f"expected: \n{expected}")
print(f"actual: \n{actual}")
self.assertEqual(expected, actual)

# file
Expand All @@ -954,6 +960,8 @@ def test_readdir(self) -> None:
sync=SyncBehavior(),
)
)
print(f"expected: \n{expected}")
print(f"actual: \n{actual}")
self.assertEqual(expected, actual)

# empty string
Expand Down Expand Up @@ -1003,8 +1011,8 @@ def readdir_single_attr_only(self, req_attr: int) -> None:
sync=SyncBehavior(),
)
)
print(expected)
print(actual_result)
print(f"expected: \n{expected}")
print(f"actual: \n{actual_result}")

self.assertEqual(
expected,
Expand Down Expand Up @@ -1053,8 +1061,8 @@ def readdir_no_size_or_sha1(
sync=SyncBehavior(),
)
)
print(expected)
print(actual)
print(f"expected: \n{expected}")
print(f"actual: \n{actual}")

self.assertEqual(
expected,
Expand All @@ -1080,8 +1088,8 @@ def readdir_no_size_or_sha1(
sync=SyncBehavior(),
)
)
print(expected)
print(actual)
print(f"expected: \n{expected}")
print(f"actual: \n{actual}")
self.assertEqual(
expected,
actual.dirLists[0].get_dirListAttributeData()[entry_name],
Expand Down

0 comments on commit a92eb43

Please sign in to comment.