From cf167f1c3777475f18f1b79c8f40a84e57c21c10 Mon Sep 17 00:00:00 2001 From: Brian Stinson Date: Jul 20 2015 05:10:26 +0000 Subject: start trying out test cases for the new assertWarns manager --- diff --git a/tests/test_distgit.py b/tests/test_distgit.py index ee12cfc..1cc9a9d 100644 --- a/tests/test_distgit.py +++ b/tests/test_distgit.py @@ -1,10 +1,7 @@ -import os -import sys import unittest -print sys.path - +from . import CatchWarningsMixin from centpkg import DistGitDirectory class TestDistGitNothing(unittest.TestCase): @@ -178,3 +175,9 @@ class TestDistgitC6PlusDistroBranch(unittest.TestCase): def test_target_gets_set(self): 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)