Skip to content

Commit 550bd93

Browse files
committed
WIP tests
1 parent 433a7da commit 550bd93

31 files changed

+837
-657
lines changed

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
**Bug fixes:**
44

55
- Fixed issue with the verification of dirty Git local repositories in operational experiments #2446
6-
- Fixed issue where Autosubmit did not retry when there were networking issues in platforms #1369
76

87
**Enhancements:**
98

autosubmit/database/db_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ def __init__(self, root_path: str, db_name: str, db_version: int):
3535
if is_new:
3636
self._initialize_database()
3737
def backup(self):
38-
pass
38+
pass # pragma: no cover
3939
def restore(self):
40-
pass
40+
pass # pragma: no cover
4141

4242
def disconnect(self):
4343
"""

autosubmit/history/platform_monitor/platform_utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ def parse_output_number(string_number):
4949
number = float(number) * multiplier
5050
except Exception:
5151
number = 0.0
52-
pass
5352
return number
5453

5554
def try_parse_time_to_timestamp(input_):

autosubmit/history/strategies.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ def execute_distribution(self, job_data_dc, job_data_dcs_in_wrapper, slurm_monit
4040

4141

4242
class Strategy(metaclass=ABCMeta):
43-
""" Strategy Interface """
43+
"""Strategy Interface"""
4444

4545
def __init__(self, historiclog_dir_path=DEFAULT_HISTORICAL_LOGS_DIR):
4646
self.historiclog_dir_path = historiclog_dir_path
4747

4848
@abstractmethod
4949
def apply_distribution(self, job_data_dc, job_data_dcs_in_wrapper, slurm_monitor):
50-
pass
50+
pass # pragma: no cover
5151

5252
def set_job_data_dc_as_processed(self, job_data_dc, original_ssh_output):
5353
job_data_dc.platform_output = original_ssh_output

autosubmit/job/job_list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1763,7 +1763,7 @@ def get_date_format(self):
17631763
return date_format
17641764

17651765
def copy_ordered_jobs_by_date_member(self):
1766-
pass
1766+
pass # pragma: no cover
17671767

17681768
def get_ordered_jobs_by_date_member(self, section):
17691769
"""

autosubmit/job/job_list_persistence.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def save(self, persistence_path, persistence_file, job_list , graph):
4242
:param persistence_path: str
4343
4444
"""
45-
raise NotImplementedError
45+
raise NotImplementedError # pragma: no cover
4646

4747
def load(self, persistence_path, persistence_file):
4848
"""
@@ -51,7 +51,7 @@ def load(self, persistence_path, persistence_file):
5151
:param persistence_path: str
5252
5353
"""
54-
raise NotImplementedError
54+
raise NotImplementedError # pragma: no cover
5555

5656

5757
class JobListPersistencePkl(JobListPersistence):

autosubmit/job/job_packager.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,6 @@ def check_if_packages_are_ready_to_build(self):
470470
if job.distance_weight > 3:
471471
sorted_jobs.remove(job)
472472
jobs_ready = sorted_jobs
473-
pass
474473
except IndexError:
475474
pass
476475
if len(jobs_ready) == 0:
@@ -867,7 +866,7 @@ def build_vertical_package(self, job, wrapper_info):
867866
return self.jobs_list
868867

869868
def get_wrappable_child(self, job):
870-
pass
869+
pass # pragma: no cover
871870

872871
def _is_wrappable(self, job):
873872
"""

autosubmit/job/job_packages.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def _create_scripts_threaded(self, jobs: list[Job], configuration: 'AutosubmitCo
134134
self._job_scripts[jobs[i].name] = jobs[i].create_script(configuration)
135135

136136
def _create_common_script(self, filename: str = ""):
137-
pass
137+
pass # pragma: no cover
138138

139139
def submit_unthreaded(self, configuration: 'AutosubmitConfig', only_generate: bool = False):
140140
"""
@@ -225,7 +225,7 @@ def _send_files(self):
225225

226226
def _do_submission(self, job_scripts=None, hold: bool = False):
227227
""" Submit package to the platform. """
228-
pass
228+
pass # pragma: no cover
229229

230230
def process_jobs_to_submit(self, job_id: str, hold: bool = False) -> None:
231231
for i, job in enumerate(self.jobs):
@@ -664,7 +664,7 @@ def _do_submission(self, job_scripts: dict[str, str] = None, hold: bool = False)
664664
self.jobs[i].wrapper_name = self.name
665665

666666
def _common_script_content(self) -> str:
667-
pass
667+
pass # pragma: no cover
668668

669669

670670
class JobPackageThreadWrapped(JobPackageThread):

autosubmit/log/log.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ class Log:
177177
log.addHandler(console_handler)
178178

179179
def __init__(self):
180-
pass
180+
pass # pragma: no cover
181181

182182
def init_variables(self, file_path="") -> None:
183183
self.file_path = file_path

autosubmit/migrate/migrate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def migrate_pickup(self):
8585
finished = False
8686
pipeline_broke = False
8787
Log.info(
88-
"Rsync launched {0} times. Can take up to 150 retries or until all data is transferred".format(
88+
"Rsync launched {0} times. Can take up to 150 retrials or until all data is transferred".format(
8989
rsync_retries + 1))
9090
try:
9191
p.send_command(

0 commit comments

Comments
 (0)