Skip to content

Commit a9e882e

Browse files
committed
Fix tests for plural of sec/secs
1 parent 0e4847c commit a9e882e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test/framework/options.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1895,7 +1895,7 @@ def test_from_pr_x(self):
18951895
re.compile(r"^\*\*\* DRY RUN using 'EB_FFTW' easyblock", re.M),
18961896
re.compile(r"^== building and installing FFTW/3.3.8-gompi-2018b\.\.\.", re.M),
18971897
re.compile(r"^building... \[DRY RUN\]", re.M),
1898-
re.compile(r"^== COMPLETED: Installation ended successfully \(took .* sec\)", re.M),
1898+
re.compile(r"^== COMPLETED: Installation ended successfully \(took .* secs?\)", re.M),
18991899
]
19001900

19011901
for msg_regex in msg_regexs:
@@ -3820,7 +3820,7 @@ def test_extended_dry_run(self):
38203820
msg_regexs = [
38213821
re.compile(r"the actual build \& install procedure that will be performed may diverge", re.M),
38223822
re.compile(r"^\*\*\* DRY RUN using 'EB_toy' easyblock", re.M),
3823-
re.compile(r"^== COMPLETED: Installation ended successfully \(took .* sec\)", re.M),
3823+
re.compile(r"^== COMPLETED: Installation ended successfully \(took .* secs?\)", re.M),
38243824
re.compile(r"^\(no ignored errors during dry run\)", re.M),
38253825
]
38263826
ignoring_error_regex = re.compile(r"WARNING: ignoring error", re.M)
@@ -4804,7 +4804,7 @@ def test_stop(self):
48044804
args = ['toy-0.0.eb', '--force', '--stop=configure']
48054805
txt, _ = self._run_mock_eb(args, do_build=True, raise_error=True, testing=False, strip=True)
48064806

4807-
regex = re.compile(r"COMPLETED: Installation STOPPED successfully \(took .* sec\)", re.M)
4807+
regex = re.compile(r"COMPLETED: Installation STOPPED successfully \(took .* secs?\)", re.M)
48084808
self.assertTrue(regex.search(txt), "Pattern '%s' found in: %s" % (regex.pattern, txt))
48094809

48104810
def test_fetch(self):
@@ -4829,7 +4829,7 @@ def test_fetch(self):
48294829

48304830
patterns = [
48314831
r"^== fetching files\.\.\.$",
4832-
r"^== COMPLETED: Installation STOPPED successfully \(took .* sec\)$",
4832+
r"^== COMPLETED: Installation STOPPED successfully \(took .* secs?\)$",
48334833
]
48344834
for pattern in patterns:
48354835
regex = re.compile(pattern, re.M)

test/framework/toy_build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def check_toy(self, installpath, outtxt, version='0.0', versionprefix='', versio
111111
full_version = ''.join([versionprefix, version, versionsuffix])
112112

113113
# check for success
114-
success = re.compile(r"COMPLETED: Installation ended successfully \(took .* sec\)")
114+
success = re.compile(r"COMPLETED: Installation ended successfully \(took .* secs?\)")
115115
self.assertTrue(success.search(outtxt), "COMPLETED message found in '%s" % outtxt)
116116

117117
# if the module exists, it should be fine

0 commit comments

Comments
 (0)