Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix deprecation warnings in a backward compatible way
- Loading branch information
Showing
12 changed files
with
160 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import six | ||
import unittest | ||
|
||
class BlivetTestCase(unittest.TestCase): | ||
def __init__(self, methodName='runTest'): | ||
# deprecation compatibility b/w python 2 and 3 | ||
if six.PY2: | ||
self.assertRaisesRegex = self.assertRaisesRegexp | ||
self.assertRegex = self.assertRegexpMatches | ||
|
||
super(BlivetTestCase, self).__init__(methodName) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.