Files
autospec/tests/test_general.py
William Douglas 874204ec31 Correct tests based on warnings
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>
2023-11-13 10:08:32 -08:00

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)