mirror of
https://git.centos.org/centos/centpkg.git
synced 2025-02-23 16:22:55 +00:00
start trying out test cases for the new assertWarns manager
This commit is contained in:
parent
484791222d
commit
cf167f1c37
1 changed files with 7 additions and 4 deletions
|
@ -1,10 +1,7 @@
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
|
|
||||||
print sys.path
|
from . import CatchWarningsMixin
|
||||||
|
|
||||||
from centpkg import DistGitDirectory
|
from centpkg import DistGitDirectory
|
||||||
|
|
||||||
class TestDistGitNothing(unittest.TestCase):
|
class TestDistGitNothing(unittest.TestCase):
|
||||||
|
@ -178,3 +175,9 @@ class TestDistgitC6PlusDistroBranch(unittest.TestCase):
|
||||||
|
|
||||||
def test_target_gets_set(self):
|
def test_target_gets_set(self):
|
||||||
self.assertEqual(self.d.target, 'c6-plus')
|
self.assertEqual(self.d.target, 'c6-plus')
|
||||||
|
|
||||||
|
class TestOldGitBranch(unittest.TestCase, CatchWarningsMixin):
|
||||||
|
def test_old_branch_warns(self):
|
||||||
|
with self.assertWarns(DeprecationWarning):
|
||||||
|
branchstring = 'virt7'
|
||||||
|
d = DistGitDirectory(branchstring)
|
||||||
|
|
Loading…
Add table
Reference in a new issue