Skip to content

Commit 4d899a9

Browse files
authored
Merge pull request #295 from wouterpeere/wouterpeere-patch-1
Fix unittests
2 parents 864cfd8 + 822333f commit 4d899a9

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

GHEtool/VariableClasses/LoadData/Baseclasses/_LoadData.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,3 +661,18 @@ def set_results(self, results) -> None: # pragma: no cover
661661

662662
def reset_results(self, min_temperature: float, max_temperature: float) -> None: # pragma: no cover
663663
pass
664+
665+
def __eq__(self, other):
666+
if not isinstance(other, self.__class__):
667+
return False
668+
if not np.all(
669+
self.monthly_peak_injection_simulation_period == other.monthly_peak_injection_simulation_period) or \
670+
not np.all(
671+
self.monthly_peak_extraction_simulation_period == other.monthly_peak_extraction_simulation_period) or \
672+
not np.all(
673+
self.monthly_baseload_extraction_simulation_period == other.monthly_baseload_extraction_simulation_period) or \
674+
not np.all(
675+
self.monthly_baseload_injection_simulation_period == other.monthly_baseload_injection_simulation_period):
676+
return False
677+
678+
return True

GHEtool/VariableClasses/LoadData/GeothermalLoad/MonthlyGeothermalLoadMultiYear.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -251,18 +251,3 @@ def peak_extraction(self, load: ArrayLike) -> None:
251251
self._peak_extraction = np.array(load)
252252
return
253253
raise ValueError
254-
255-
def __eq__(self, other):
256-
if not isinstance(other, self.__class__):
257-
return False
258-
if not np.all(
259-
self.monthly_peak_injection_simulation_period == other.monthly_peak_injection_simulation_period) or \
260-
not np.all(
261-
self.monthly_peak_extraction_simulation_period == other.monthly_peak_extraction_simulation_period) or \
262-
not np.all(
263-
self.monthly_baseload_extraction_simulation_period == other.monthly_baseload_extraction_simulation_period) or \
264-
not np.all(
265-
self.monthly_baseload_injection_simulation_period == other.monthly_baseload_injection_simulation_period):
266-
return False
267-
268-
return True

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = GHEtool
3-
version = 2.3.0.dev4
3+
version = 2.3.0.dev5
44
author = Wouter Peere
55
author_email = wouter@ghetool.eu
66
description = Python package for borefield sizing

0 commit comments

Comments
 (0)