Skip to content

Commit bddcbba

Browse files
committed
FIX: Replace failIf() with assertFalse() in Python unit tests (deprecated).
1 parent 1bd4a4d commit bddcbba

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/pytests/spatialdb/TestTimeHistoryIO.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def test_write(self):
4747
for (lineE, line) in zip(linesE, lines):
4848
if lineE != line:
4949
print("Error found in line %d in file '%s' is incorrect." % (iline, filename))
50-
self.failIf(True)
50+
self.assertTrue(False)
5151
iline += 1
5252

5353

tests/pytests/utils/TestSpatialdataVersion.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def test_version(self):
2323
# Check that version is of the form X.X.X
2424
import re
2525
match = re.search("[0-9]+\.[0-9]+\.[0-9]+", version)
26-
self.failIf(match is None)
26+
self.assertFalse(match is None)
2727

2828
def test_gitVersion(self):
2929
revision = SpatialdataVersion.gitRevision()
@@ -35,7 +35,7 @@ def test_gitVersion(self):
3535
match = re.search("v[0-9]+\.[0-9]+\.[0-9]+", revision)
3636
if match is None:
3737
match = re.search("v[0-9]+\.[0-9]+\.[0-9]+-[0-9]+-g[0-9,a-z]+", revision)
38-
self.failIf(match is None)
38+
self.assertFalse(match is None)
3939

4040
def test_gitHash(self):
4141
tag = SpatialdataVersion.gitHash()
@@ -45,7 +45,7 @@ def test_gitHash(self):
4545
# Check form of hash
4646
import re
4747
match = re.search("[0-9,a-z]+", tag)
48-
self.failIf(match is None)
48+
self.assertFalse(match is None)
4949

5050
def test_gitDate(self):
5151
value = SpatialdataVersion.gitDate()
@@ -63,14 +63,14 @@ def test_gitBranch(self):
6363
if SpatialdataVersion.isRelease():
6464
self.assertEqual("unknown", branch)
6565
else:
66-
self.failIf(len(branch) == 0)
66+
self.assertFalse(len(branch) == 0)
6767

6868
def test_projVersion(self):
6969
version = SpatialdataVersion.projVersion()
7070
# Check that version is of the form XXX
7171
import re
7272
match = re.search("[0-9]+", version)
73-
self.failIf(match is None)
73+
self.assertFalse(match is None)
7474

7575

7676
# End of file

0 commit comments

Comments
 (0)