Skip to content

Commit 999deb3

Browse files
committed
Mock and catch warning message
1 parent c352a9a commit 999deb3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/framework/filetools.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2589,7 +2589,10 @@ def run_check():
25892589

25902590
# use a tag that clashes with a branch name and make sure this is handled correctly
25912591
git_config['tag'] = 'tag_for_tests'
2592-
res = ft.get_source_tarball_from_git('test.tar.gz', target_dir, git_config)
2592+
with self.mocked_stdout_stderr():
2593+
res = ft.get_source_tarball_from_git('test.tar.gz', target_dir, git_config)
2594+
stderr = self.get_stderr()
2595+
self.assertIn('Tag tag_for_tests was not downloaded in the first try', stderr)
25932596
self.assertEqual(res, test_file)
25942597
self.assertTrue(os.path.isfile(test_file))
25952598
# Check that we indeed downloaded the tag and not the branch

0 commit comments

Comments
 (0)