Skip to content

Commit e06d775

Browse files
committed
update error messages
1 parent bef9642 commit e06d775

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

nf_core/components/components_test.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,13 +208,12 @@ def generate_snapshot(self) -> bool:
208208
obsolete_snapshots = compiled_pattern.search(nftest_out.decode())
209209
if obsolete_snapshots:
210210
self.obsolete_snapshots = True
211-
212211
# check if nf-test was successful
213212
if "Assertion failed:" in nftest_out.decode():
214213
return False
215-
elif "no valid tests found." in nftest_out.decode():
216-
log.error("Test file 'main.nf.test' not found")
217-
self.errors.append("Test file 'main.nf.test' not found")
214+
elif "No tests to execute." in nftest_out.decode():
215+
log.error("Nothing to execute. Is the file 'main.nf.test' missing?")
216+
self.errors.append("Nothing to execute. Is the file 'main.nf.test' missing?")
218217
return False
219218
else:
220219
log.debug("nf-test successful")

tests/components/test_components_generate_snapshot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,5 +136,5 @@ def test_test_not_found(self):
136136
test_file.rename(test_file.parent / "main.nf.test.bak")
137137
with pytest.raises(UserWarning) as e:
138138
snap_generator.run()
139-
assert "No tests to execute." in str(e.value)
139+
assert "Nothing to execute. Is the file 'main.nf.test' missing?" in str(e.value)
140140
Path(test_file.parent / "main.nf.test.bak").rename(test_file)

0 commit comments

Comments
 (0)