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
""" | |
This is a simple "pass-through" patch recipe for python testing | |
Allows to check if a method was called during testing | |
For example: | |
``` | |
with nosy_patch('package.inner_method') as mock: | |
package.outter_method() |
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
""" | |
A simple snippet that can be used to read CSV files with headers | |
""" | |
import csv | |
from contextlib import contextmanager | |
@contextmanager | |
def dcsv(filename): | |
with open(filename) as reader: |
OlderNewer