diff --git a/src/data_generator.py b/src/data_generator.py index 663f79a2d9e73a319e3daa0630f23f180eee856a..860791235f111a7ffb151f2b06424be76dc8eba7 100644 --- a/src/data_generator.py +++ b/src/data_generator.py @@ -98,7 +98,6 @@ class DataGenerator(keras.utils.Sequence): station = self.get_station_key(key) data = DataPrep(self.data_path, self.network, station, self.variables, station_type=self.station_type, **self.kwargs) - print("data: ", data) data.interpolate(self.interpolate_dim, method=self.interpolate_method, limit=self.limit_nan_fill) data.transform("datetime", method=self.transform_method) data.make_history_window(self.interpolate_dim, self.window_history) diff --git a/test/test_data_generator.py b/test/test_data_generator.py index e932598a6c3054c0ecbae2f17251ed0fd728aaa9..d3f07524f4495f6d6ddd818b01707061035f0a81 100644 --- a/test/test_data_generator.py +++ b/test/test_data_generator.py @@ -43,13 +43,9 @@ class TestDataGenerator: gen.stations = ['station1', 'station2', 'station3'] assert len(gen) == 3 - def test_getitem(self, caplog, gen): - caplog.set_level(logging.DEBUG) - print(gen) + def test_getitem(self, gen): gen.kwargs = {'statistics_per_var': {'o3': 'dma8eu', 'temp': 'maximum'}} - print(gen) station = gen["DEBW107"] - print(station) assert len(station) == 2 assert station[0].Stations.data == "DEBW107" assert station[0].data.shape[1:] == (8, 1, 2) diff --git a/test/test_modules/test_pre_processing.py b/test/test_modules/test_pre_processing.py index eb7ba4e8f4d909711f92ca667b98ae403cb30756..5c2521252855237165d3ae6c5458dafacb51d751 100644 --- a/test/test_modules/test_pre_processing.py +++ b/test/test_modules/test_pre_processing.py @@ -43,7 +43,8 @@ class TestPreProcessing: PreProcessing() assert caplog.record_tuples[0] == ('root', 20, 'PreProcessing started') assert caplog.record_tuples[1] == ('root', 20, 'check valid stations started') - assert caplog.record_tuples[-2] == ('root', 20, PyTestRegex(r'run for \d+\.\d+s to check 5 station\(s\)')) + assert caplog.record_tuples[-2] == ('root', 20, PyTestRegex(r'run for \d+\.\d+s to check 5 station\(s\). Found ' + r'5/5 valid stations.')) RunEnvironment().__del__() def test_run(self, obj_with_exp_setup):