mirror of
https://github.com/clearlinux/autospec.git
synced 2026-04-28 19:13:45 +00:00
Previous code would emit: SyntaxWarning: invalid escape sequence Correct this by removing the escapes as they are not necessary. Also add a missing buildreq that is detected correctly after the fix. Signed-off-by: William Douglas <william.douglas@intel.com>
25 lines
663 B
Python
25 lines
663 B
Python
import subprocess
|
|
import unittest
|
|
|
|
|
|
class TestGeneral(unittest.TestCase):
|
|
|
|
def test_ConfigParser_regressions(self):
|
|
"""
|
|
Make sure ConfigParser is always called with the required
|
|
interpolation=None argument
|
|
"""
|
|
grep_cmd = ["grep", "-re",
|
|
"ConfigParser(.*(^interpolation=None).*)",
|
|
"autospec"]
|
|
try:
|
|
output = subprocess.check_output(grep_cmd).decode('utf-8')
|
|
except subprocess.CalledProcessError as e:
|
|
output = e.output.decode('utf-8')
|
|
|
|
self.assertEqual(output.strip(), "")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main(buffer=True)
|