Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put extra arg test back #1641

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

XiaohanZhangCMU
Copy link
Member

With streaming upgraded to 0.9.1, the unit test would lead to inf loop.

@XiaohanZhangCMU XiaohanZhangCMU marked this pull request as ready for review November 5, 2024 07:10
mock_stat = MagicMock()
mock_stat.st_size = 1024 # Mock st_size with a desired value
mock_stat.st_mode = 33188 # Regular file mode for Unix-based systems
def custom_stat_mock(path: Any):
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is some really intense patching, are you sure this test can't be made simpler?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, should be, but I was not able to come up with one. Any suggestions? I basically need
os.path.exists(filelocks) to behave normally, and other os.stat to return a mock stat when testing with private-streaming.

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.

3 participants