Use py.path in one more place

This commit is contained in:
Anthony Sottile 2016-08-11 23:08:13 -07:00
parent 6dfcb89af3
commit d3a93e6d1e
2 changed files with 3 additions and 10 deletions

View file

@ -1,7 +1,6 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import io
import os.path
@ -10,9 +9,3 @@ TESTING_DIR = os.path.abspath(os.path.dirname(__file__))
def get_resource_path(path):
return os.path.join(TESTING_DIR, 'resources', path)
def write_file(filename, contents):
"""Hax because coveragepy chokes on nested context managers."""
with io.open(filename, 'w', newline='') as file_obj:
file_obj.write(contents)