Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v.what: Add expectedFailure and enable tests #5342

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/macos_gunittest.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ exclude =
vector/v.in.pdal/testsuite/test_v_in_pdal_basic.py
vector/v.in.pdal/testsuite/test_v_in_pdal_filter.py
vector/v.out.lidar/testsuite/test_v_out_lidar.py
vector/v.what/testsuite/test_vwhat_layers.py
vector/v.what/testsuite/test_vwhat_ncspm.py

# Maximum time for execution of one test file (not a test function)
# after which test is terminated (which may not terminate child processes
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/osgeo4w_gunittest.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ exclude =
vector/v.in.lidar/testsuite/test_v_in_lidar_basic.py
vector/v.in.lidar/testsuite/test_v_in_lidar_filter.py
vector/v.what.rast3/testsuite/test.v.what.rast3.sh
vector/v.what/testsuite/test_vwhat_layers.py
vector/v.what/testsuite/test_vwhat_ncspm.py

# Maximum time for execution of one test file (not a test function)
# after which test is terminated (which may not terminate child processes
Expand Down
2 changes: 0 additions & 2 deletions .gunittest.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ exclude =
vector/v.in.pdal/testsuite/test_v_in_pdal_basic.py
vector/v.in.pdal/testsuite/test_v_in_pdal_filter.py
vector/v.out.lidar/testsuite/test_v_out_lidar.py
vector/v.what/testsuite/test_vwhat_layers.py
vector/v.what/testsuite/test_vwhat_ncspm.py

# Maximum time for execution of one test file (not a test function)
# after which test is terminated (which may not terminate child processes
Expand Down
5 changes: 5 additions & 0 deletions vector/v.what/testsuite/test_vwhat_layers.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import unittest

from grass.gunittest.case import TestCase
from grass.gunittest.main import test
from grass.gunittest.gmodules import SimpleModule
Expand Down Expand Up @@ -183,10 +185,12 @@ def setUp(self):
"v.what", map="test_vector", coordinates=[634243, 226193], distance=10
)

@unittest.expectedFailure
def test_run(self):
self.assertModule(self.vwhat)
self.assertLooksLike(reference=out1, actual=self.vwhat.outputs.stdout)

@unittest.expectedFailure
def test_print_options(self):
self.vwhat.flags["a"].value = True
self.assertModule(self.vwhat)
Expand All @@ -209,6 +213,7 @@ def test_print_options_json(self):
msg="No JSON object could be decoded:\n" + self.vwhat.outputs.stdout
)

@unittest.expectedFailure
def test_selected_layers(self):
self.vwhat.inputs.layer = -1
self.vwhat.flags["g"].value = True
Expand Down
5 changes: 5 additions & 0 deletions vector/v.what/testsuite/test_vwhat_ncspm.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Author: Anna Petrasova

import unittest

from grass.gunittest.case import TestCase
from grass.gunittest.main import test
from grass.gunittest.gmodules import SimpleModule
Expand Down Expand Up @@ -182,10 +184,12 @@ def setUp(self):
distance=1000,
)

@unittest.expectedFailure
def test_multiple_maps(self):
self.assertModule(self.vwhat)
self.assertMultiLineEqual(first=out1, second=self.vwhat.outputs.stdout)

@unittest.expectedFailure
def test_print_options(self):
self.vwhat.flags["a"].value = True
self.assertModule(self.vwhat)
Expand All @@ -195,6 +199,7 @@ def test_print_options(self):
self.assertModule(self.vwhat)
self.assertLooksLike(reference=out3, actual=self.vwhat.outputs.stdout)

@unittest.expectedFailure
def test_threshold(self):
self.vwhat.inputs["distance"].value = 100
self.assertModule(self.vwhat)
Expand Down
Loading