Skip to content

Commit

Permalink
Remove logging to file, update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhahn committed May 7, 2019
1 parent 6d9bacc commit f4ffaf4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
5 changes: 0 additions & 5 deletions ismn/class_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
from pygeogrids.grids import BasicGrid

logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)

ch = logging.StreamHandler()
ch.setLevel(logging.INFO)
Expand Down Expand Up @@ -979,10 +978,6 @@ def create_network_collection(path, load_data=False):
nwc : NetworkCollection
Metadata and data (if loaded) from in situ data.
"""
log_filename = os.path.join(path, 'python_metadata', 'metadata.log')
fh = logging.FileHandler(log_filename)
logger.addHandler(fh)

fc = IsmnFileCollection(path, load_data)
nwc = NetworkCollection(fc)

Expand Down
8 changes: 6 additions & 2 deletions tests/test_class_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,17 @@ def test_get_sensors(self):
"""
Test accessing sensor metadata and data.
"""
pass
for sensor in self.nwc.get_sensors():
assert sensor.instrument == 'Cosmic-ray-Probe'

def test_get_nearest_station(self):
"""
Test nearest station method.
"""
pass
station, dist = self.nwc.get_nearest_station(-97, 36)
np.testing.assert_almost_equal(station.lon, -97.4878, 4)
np.testing.assert_almost_equal(station.lat, 36.6054, 4)
np.testing.assert_almost_equal(dist, 80201.85, 2)


class IsmnFileTest(unittest.TestCase):
Expand Down

0 comments on commit f4ffaf4

Please sign in to comment.