-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_FillPartialArrays.py
More file actions
53 lines (48 loc) · 1.26 KB
/
test_FillPartialArrays.py
File metadata and controls
53 lines (48 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright 2023-2024 TotalEnergies.
# SPDX-FileContributor: Romain Baville
# SPDX-License-Identifier: Apache 2.0
# ruff: noqa: E402 # disable Module level import not at top of file
# mypy: disable-error-code="operator"
import pytest
from typing import Any
from vtkmodules.vtkCommonDataModel import vtkMultiBlockDataSet
from geos.mesh.processing.FillPartialArrays import FillPartialArrays
@pytest.mark.parametrize( "dictAttributesValues", [
( {
"PORO": None
} ),
( {
"PERM": None
} ),
( {
"PORO": None,
"PERM": None
} ),
( {
"PORO": [ 4 ]
} ),
( {
"PERM": [ 4, 4, 4 ]
} ),
( {
"PORO": [ 4 ],
"PERM": [ 4, 4, 4 ]
} ),
( {
"PORO": None,
"PERM": [ 4, 4, 4 ]
} ),
( {
"PORO": [ 4 ],
"PERM": None
} ),
] )
def test_FillPartialArrays(
dataSetTest: vtkMultiBlockDataSet,
dictAttributesValues: dict[ str, Any ],
) -> None:
"""Test FillPartialArrays vtk filter."""
multiBlockDataSet: vtkMultiBlockDataSet = dataSetTest( "multiblock" )
filter: FillPartialArrays = FillPartialArrays( multiBlockDataSet, dictAttributesValues )
assert filter.applyFilter()