SyntaxFix
Write A Post
Hire A Developer
Questions
If you don't need any file further, you can decorate the test method:
@patch('builtins.open', mock_open(read_data="data")) def test_testme(): result = testeme() assert result == "data"