From 64344553369d6098074ca15e6df229ad89d28e6e Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Jun 21 2024 18:42:40 +0000 Subject: Update tests to look for warning Signed-off-by: Troy Dawson --- diff --git a/tests/test_distgit.py b/tests/test_distgit.py index 5519a78..0b90f6c 100644 --- a/tests/test_distgit.py +++ b/tests/test_distgit.py @@ -13,11 +13,11 @@ class TestDistGitNothing(unittest.TestCase): with self.assertRaises(TypeError): d = DistGitDirectory() -class TestDistGitInvalid(unittest.TestCase): +class TestDistGitInvalid(unittest.TestCase, CatchWarningsMixin): def test_invalid_branchstring_raises(self): self.branchstring = 'nope-not-a-branch' - with self.assertRaises(ValueError): + with self.assertRaises(UserWarning): self.d = DistGitDirectory(self.branchstring) class TestDistgitOnlySig(unittest.TestCase): @@ -244,4 +244,4 @@ class TestIsFork(unittest.TestCase): @unittest.mock.patch.object(centpkg_git.repo.Repo, '__init__', new=lambda s, p: None) def test_upstream_url(self): d = DistGitDirectory(self.branchstring, 'binutils') - self.assertFalse(d.is_fork()) \ No newline at end of file + self.assertFalse(d.is_fork())