This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python | |
import fire | |
import random | |
import humanize | |
import sys | |
def make_large_file(file: str, size: int, random: bool=False) -> None: | |
""" | |
Create a file with random bytes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# author: [email protected] | |
@pytest.fixture | |
def mock_file(): | |
"""Mock file open.""" | |
@contextlib.contextmanager | |
def contextmanager(file_name: str, content: bytes, obj): | |
""" | |
Context manager for mocking file. |
NewerOlder