Skip to content

Commit

Permalink
unittest: fix assertNotRegexMatches() removed from python 3.12 (OSGeo…
Browse files Browse the repository at this point in the history
  • Loading branch information
pesekon2 authored and neteler committed Nov 7, 2023
1 parent decf7b8 commit 7044e11
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scripts/db.dropcolumn/testsuite/test_db_dropcolumn.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_drop_column_with_force(self):

m = SimpleModule("db.columns", table=self.mapName)
self.assertModule(m)
self.assertNotRegexpMatches(decode(m.outputs.stdout), self.colName)
self.assertNotRegex(decode(m.outputs.stdout), self.colName)


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion scripts/db.droptable/testsuite/test_db_droptable.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_drop_table_with_force(self):

m = SimpleModule("db.tables", flags="p")
self.assertModule(m)
self.assertNotRegexpMatches(decode(m.outputs.stdout), self.mapName)
self.assertNotRegex(decode(m.outputs.stdout), self.mapName)


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion scripts/v.db.addtable/testsuite/test_v_db_addtable.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_add_single_columned_table_check(self):

m = SimpleModule("v.info", map="myroads", flags="c")
self.assertModule(m)
self.assertNotRegexpMatches(decode(m.outputs.stdout), "slope")
self.assertNotRegex(decode(m.outputs.stdout), "slope")

m = SimpleModule("v.info", map="myroads", flags="c", layer=2)
self.assertModule(m)
Expand Down
2 changes: 1 addition & 1 deletion scripts/v.db.dropcolumn/testsuite/test_v_db_dropcolumn.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_drop_single_column_check(self):

m = SimpleModule("v.info", map="myroads", flags="c")
self.assertModule(m)
self.assertNotRegexpMatches(decode(m.outputs.stdout), "SHAPE_LEN")
self.assertNotRegex(decode(m.outputs.stdout), "SHAPE_LEN")


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion scripts/v.db.droptable/testsuite/test_v_db_droptable.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_drop_table_with_force(self):

m = SimpleModule("db.tables", flags="p")
self.assertModule(m)
self.assertNotRegexpMatches(decode(m.outputs.stdout), "myroads")
self.assertNotRegex(decode(m.outputs.stdout), "myroads")


if __name__ == "__main__":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def test_rename_column(self):
m = SimpleModule("v.info", flags="c", map="myroads")
self.assertModule(m)
self.assertRegexpMatches(decode(m.outputs.stdout), "roadname")
self.assertNotRegexpMatches(decode(m.outputs.stdout), "ROAD_NAME")
self.assertNotRegex(decode(m.outputs.stdout), "ROAD_NAME")


if __name__ == "__main__":
Expand Down

0 comments on commit 7044e11

Please sign in to comment.