Skip to content

Commit

Permalink
replace deprecated assertRegexpMatches -> assertRegex
Browse files Browse the repository at this point in the history
Close: #374
  • Loading branch information
stkw0 committed Jul 27, 2023
1 parent fc8a14e commit f44f796
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/testOutputCSV.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_csv_header(self):
options_mock.verbose = True
options_mock.extensions = []
csv_output(AllResult([self.fileSummary]), options_mock)
self.assertRegexpMatches(sys.stdout.stream,
self.assertRegex(sys.stdout.stream,
r"NLOC,CCN,token,PARAM,length,location,file,function,long_name,start,end")

def test_csv_header_with_extension(self):
Expand All @@ -35,7 +35,7 @@ def test_csv_header_with_extension(self):
results = AllResult([self.fileSummary])
results.result[0].function_list[0].exit_count = 1
csv_output(results, options_mock)
self.assertRegexpMatches(sys.stdout.stream,
self.assertRegex(sys.stdout.stream,
r"NLOC,CCN,token,PARAM,length,location,file,function,long_name,start,end,exits")

def test_csv_no_header(self):
Expand Down
3 changes: 1 addition & 2 deletions test/testOutputHTML.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ def setUp(self):

def test_should_have_html_body(self):
html_output([self.fileSummary], self.option, None, AllResult)
self.assertRegexpMatches(sys.stdout.stream,
r"\<html\>")
self.assertRegex(sys.stdout.stream, r"\<html\>")

0 comments on commit f44f796

Please sign in to comment.