"""
This module implements tests for SRS Reader.
"""
import os

import pytest

from sunpy.io.special import srs
import sunpy.data.test

testpath = sunpy.data.test.rootdir

filenames = [{'file': '20150906SRS.txt', 'rows': 5},
             {'file': '20150306SRS.txt', 'rows': 4},
             {'file': '20150101SRS.txt', 'rows': 9}]


@pytest.mark.parametrize("path, number_of_rows",
                         [(os.path.join(testpath, elem['file']), elem['rows'])
                          for elem in filenames])
def test_number_of_rows(path, number_of_rows):
    table = srs.read_srs(path)
    assert len(table) == number_of_rows


@@ -70,16 +70,174 @@
 t pytest
+%0Aimport numpy as np%0Aimport astropy.units as u%0Afrom astropy.table import Table, Column, MaskedColumn%0Afrom  astropy.tests.helper import assert_quantity_allclose
 %0A%0Afrom s
@@ -487,302 +487,1715 @@
 %7D%5D%0A%0A
-%0A@pytest.mark.parametrize(%22path, number_of_rows%22,%0A                         %5B(os.path.join(testpath, elem%5B'file'%5D), elem%5B'rows'%5D)%0A                          for elem in filenames%5D)%0Adef test_number_of_rows(path, number_of_rows):%0A    table = srs.read_srs(path)%0A    assert len(table) == number_of_rows
+COORDINATES = %5B%7B'text': 'N10W05', 'latitude': 10,  'longitude': 5%7D,%0A               %7B'text': 'N89E00', 'latitude': 89,  'longitude': 0%7D,%0A               %7B'text': 'S33E02', 'latitude': -33, 'longitude': -2%7D,%0A               %7B'text': 'S01', 'latitude': -1, 'longitude': None%7D%5D%0A%0ALOCATION = Column(data=%5Bx%5B'text'%5D for x in COORDINATES%5D, name='Location')%0ALONGLAT = Table()%0ALONGLAT.add_column(MaskedColumn(data=%5Bx%5B'longitude'%5D for x in COORDINATES%5D, name='Longitude', unit=u.deg, mask=True))%0ALONGLAT.add_column(MaskedColumn(data=%5Bx%5B'latitude'%5D for x in COORDINATES%5D, name='Latitude', unit=u.deg))%0A%0A@pytest.mark.parametrize(%22path, number_of_rows%22,%0A                         %5B(os.path.join(testpath, elem%5B'file'%5D), elem%5B'rows'%5D)%0A                          for elem in filenames%5D)%0Adef test_number_of_rows(path, number_of_rows):%0A    table = srs.read_srs(path)%0A    assert len(table) == number_of_rows%0A%0A@pytest.mark.parametrize(%22text, longitude%22,%0A                         %5B(elem%5B'text'%5D, elem%5B'longitude'%5D) for elem in COORDINATES%5D)%0Adef test_parse_longitude(text, longitude):%0A    assert srs.parse_longitude(text) == longitude%0A%0A@pytest.mark.parametrize(%22text, latitude%22,%0A                         %5B(elem%5B'text'%5D, elem%5B'latitude'%5D)  for elem in COORDINATES%5D)%0Adef test_parse_latitude(text, latitude):%0A    assert srs.parse_latitude(text) == latitude%0A%0A@pytest.mark.parametrize(%22loc_column, exp_longitude, exp_latitude%22,%0A                         %5B(LOCATION, LONGLAT%5B'Longitude'%5D, LONGLAT%5B'Latitude'%5D)%5D)%0Adef test_parse_location(loc_column, exp_longitude, exp_latitude):%0A    latitude, longitude = srs.parse_location(loc_column)%0A    assert_quantity_allclose(latitude, exp_latitude)%0A    assert_quantity_allclose(longitude, exp_longitude)
 %0A%0A

Add tests to smaller functions