Skip to content
Merged
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
11 changes: 4 additions & 7 deletions raster/r.kappa/testsuite/test_r_kappa.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@
import os
import json
from pathlib import Path
from tempfile import NamedTemporaryFile

from grass.script import read_command
from grass.script import decode
from grass.script.core import tempname
from grass.script.core import tempfile, tempname
from grass.gunittest.case import TestCase
from grass.gunittest.main import test
from grass.gunittest.checkers import keyvalue_equals, diff_keyvalue
from grass.gunittest.utils import xfail_windows


class MatrixCorrectnessTest(TestCase):
Expand Down Expand Up @@ -488,19 +486,18 @@ def test_stdout(self):
),
)

@xfail_windows
def test_file(self):
for i in range(len(self.references)):
f = NamedTemporaryFile()
outfile = tempfile(create=False)
self.runModule(
"r.kappa",
reference=self.references[i],
classification=self.classifications[i],
output=f.name,
output=outfile,
format="json",
overwrite=True,
)
json_out = json.loads(f.read())
json_out = json.loads(Path(outfile).read_text())
self.assertTrue(
keyvalue_equals(
self.expected_outputs[i], json_out, precision=self.precision
Expand Down
Loading