<filename>scripts/study_case/ID_4/test/transforms/test_normalize_features.py
import torch
from scripts.study_case.ID_4.torch_geometric.transforms import NormalizeFeatures
from scripts.study_case.ID_4.torch_geometric.data import Data


def test_normalize_scale():
    assert NormalizeFeatures().__repr__() == 'NormalizeFeatures()'

    x = torch.Tensor([[1, 0, 1], [0, 1, 0], [0, 0, 0]])

    data = Data(x=x)
    data = NormalizeFeatures()(data)
    assert len(data) == 1
    assert data.x.tolist() == [[0.5, 0, 0.5], [0, 1, 0], [0, 0, 0]]

<filename>scripts/study_case/ID_4/test/transforms/test_normalize_features.py
import torch
from scripts.study_case.ID_4.torch_geometric.transforms import NormalizeFeatures
from scripts.study_case.ID_4.torch_geometric.data import Data


def test_normalize_scale():
    assert NormalizeFeatures().__repr__() == 'NormalizeFeatures()'

    x = torch.Tensor([[1, 0, 1], [0, 1, 0], [0, 0, 0]])

    data = Data(x=x)
    data = NormalizeFeatures()(data)
    assert len(data) == 1
    assert data.x.tolist() == [[0.5, 0, 0.5], [0, 1, 0], [0, 0, 0]]
