Fixes https://github.com/pyugrid/pyugrid/issues/24 and passes PEP8.

Adds a context manager to switch tests into the proper directory for loading test files. Bonus: fixed some spacing that had used tabs and PEP8-afied test_read.py.
On Thu, Jun 26, 2014 at 9:41 AM, Chris Calloway <notifications@github.com>
wrote:

>  I didn't spin off another test utilities module a) in order to have
> minimal impact on the pyugrid package to fix this one thing. b) to do just
> what works, and c) as per doing what works, only factoring something out
> when it becomes necessary.
>
good call, however, I jsut noticed that there is test_util.py, which
contains one one function:

```
def get_test_file_path(file_path):
    """translates a file path to be relative to the test files directory"""
    return os.path.join(os.path.dirname(__file__), 'files', file_path)
```
so someone had thought of this already, but apparently hadn't used it (that
"hadn't used it" someone was likely me...)

test_utils probably shouldn't be named that, as pytest will think it's a
file with tests in it, but otherwise,  fine idea.

But I like the context manager better anyway.

-CHB


-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker@noaa.gov