def test_write_defaults_to_file(): with NamedTemporaryFile() as f: write_defaults_to_file(f.name)
def test_load_defaults_from_file(): with NamedTemporaryFile() as f: write_defaults_to_file(f.name) load_defaults_from_file(f.name)
def test_load_defaults_from_file(): with SafeTemporaryFileName('defaults.py') as filename: write_defaults_to_file(filename) load_defaults_from_file(filename)