Unverified Commit e250ba3d authored by Hongzhi (Steve), Chen's avatar Hongzhi (Steve), Chen Committed by GitHub
Browse files

[Misc] Rename test_utils -> pytests_utils. (#5438)



* rename

* sort

* rename

---------
Co-authored-by: default avatarUbuntu <ubuntu@ip-172-31-28-63.ap-northeast-1.compute.internal>
parent fe3d29ac
import backend as F import backend as F
import dgl import dgl
from test_utils import parametrize_idtype from pytests_utils import parametrize_idtype
@parametrize_idtype @parametrize_idtype
......
...@@ -4,7 +4,7 @@ import backend as F ...@@ -4,7 +4,7 @@ import backend as F
from dgl.distributed import graph_partition_book as gpb from dgl.distributed import graph_partition_book as gpb
from dgl.partition import NDArrayPartition from dgl.partition import NDArrayPartition
from test_utils import parametrize_idtype from pytests_utils import parametrize_idtype
@unittest.skipIf( @unittest.skipIf(
......
...@@ -5,7 +5,7 @@ import backend as F ...@@ -5,7 +5,7 @@ import backend as F
import dgl import dgl
import networkx as nx import networkx as nx
import utils as U import utils as U
from test_utils import parametrize_idtype from pytests_utils import parametrize_idtype
def create_graph(idtype): def create_graph(idtype):
......
...@@ -6,8 +6,8 @@ import dgl ...@@ -6,8 +6,8 @@ import dgl
import networkx as nx import networkx as nx
import numpy as np import numpy as np
import pytest import pytest
from test_utils import parametrize_idtype from pytests_utils import parametrize_idtype
from test_utils.graph_cases import get_cases from pytests_utils.graph_cases import get_cases
@parametrize_idtype @parametrize_idtype
......
...@@ -4,7 +4,7 @@ import dgl ...@@ -4,7 +4,7 @@ import dgl
import numpy as np import numpy as np
import pytest import pytest
import scipy.sparse as ssp import scipy.sparse as ssp
from test_utils import parametrize_idtype from pytests_utils import parametrize_idtype
if F.backend_name == "pytorch": if F.backend_name == "pytorch":
import torch import torch
......
...@@ -7,7 +7,7 @@ import networkx as nx ...@@ -7,7 +7,7 @@ import networkx as nx
import numpy as np import numpy as np
import pytest import pytest
import scipy.sparse as ssp import scipy.sparse as ssp
from test_utils import parametrize_idtype from pytests_utils import parametrize_idtype
D = 5 D = 5
......
...@@ -10,7 +10,7 @@ import dgl ...@@ -10,7 +10,7 @@ import dgl
import networkx as nx import networkx as nx
import numpy as np import numpy as np
import scipy.sparse as sp import scipy.sparse as sp
from test_utils import parametrize_idtype from pytests_utils import parametrize_idtype
np.random.seed(42) np.random.seed(42)
......
...@@ -11,7 +11,7 @@ import numpy as np ...@@ -11,7 +11,7 @@ import numpy as np
import pytest import pytest
import scipy.sparse as ssp import scipy.sparse as ssp
from dgl import DGLError from dgl import DGLError
from test_utils import parametrize_idtype from pytests_utils import parametrize_idtype
def create_test_heterograph(num_nodes, num_adj, idtype): def create_test_heterograph(num_nodes, num_adj, idtype):
......
...@@ -18,7 +18,7 @@ import backend as F ...@@ -18,7 +18,7 @@ import backend as F
import dgl import dgl
import dgl.partition import dgl.partition
from test_utils import parametrize_idtype from pytests_utils import parametrize_idtype
@parametrize_idtype @parametrize_idtype
......
...@@ -26,9 +26,9 @@ import dgl.partition ...@@ -26,9 +26,9 @@ import dgl.partition
import networkx as nx import networkx as nx
import numpy as np import numpy as np
import pytest import pytest
from pytests_utils import parametrize_idtype
from pytests_utils.graph_cases import get_cases
from scipy import sparse as spsp from scipy import sparse as spsp
from test_utils import parametrize_idtype
from test_utils.graph_cases import get_cases
D = 5 D = 5
......
...@@ -5,7 +5,7 @@ import backend as F ...@@ -5,7 +5,7 @@ import backend as F
import dgl import dgl
import numpy as np import numpy as np
from dgl.utils import Filter from dgl.utils import Filter
from test_utils import parametrize_idtype from pytests_utils import parametrize_idtype
def test_graph_filter(): def test_graph_filter():
......
...@@ -9,8 +9,8 @@ import numpy as np ...@@ -9,8 +9,8 @@ import numpy as np
import pytest import pytest
import scipy as sp import scipy as sp
from mxnet import autograd, gluon, nd from mxnet import autograd, gluon, nd
from test_utils import parametrize_idtype from pytests_utils import parametrize_idtype
from test_utils.graph_cases import ( from pytests_utils.graph_cases import (
get_cases, get_cases,
random_bipartite, random_bipartite,
random_dglgraph, random_dglgraph,
......
...@@ -11,7 +11,7 @@ import numpy as np ...@@ -11,7 +11,7 @@ import numpy as np
import pytest import pytest
import torch import torch
import torch.distributed as dist import torch.distributed as dist
from test_utils import parametrize_idtype from pytests_utils import parametrize_idtype
@pytest.mark.parametrize("batch_size", [None, 16]) @pytest.mark.parametrize("batch_size", [None, 16])
......
...@@ -8,8 +8,8 @@ import torch as th ...@@ -8,8 +8,8 @@ import torch as th
from dgl import DGLError from dgl import DGLError
from dgl.base import DGLWarning from dgl.base import DGLWarning
from dgl.geometry import farthest_point_sampler, neighbor_matching from dgl.geometry import farthest_point_sampler, neighbor_matching
from test_utils import parametrize_idtype from pytests_utils import parametrize_idtype
from test_utils.graph_cases import get_cases from pytests_utils.graph_cases import get_cases
def test_fps(): def test_fps():
......
...@@ -6,7 +6,7 @@ import dgl ...@@ -6,7 +6,7 @@ import dgl
import numpy as np import numpy as np
import pytest import pytest
import torch import torch
from test_utils import parametrize_idtype from pytests_utils import parametrize_idtype
random.seed(42) random.seed(42)
np.random.seed(42) np.random.seed(42)
......
...@@ -12,8 +12,8 @@ import pytest ...@@ -12,8 +12,8 @@ import pytest
import scipy as sp import scipy as sp
import torch import torch
import torch as th import torch as th
from test_utils import parametrize_idtype from pytests_utils import parametrize_idtype
from test_utils.graph_cases import ( from pytests_utils.graph_cases import (
get_cases, get_cases,
random_bipartite, random_bipartite,
random_dglgraph, random_dglgraph,
......
...@@ -10,14 +10,14 @@ import numpy as np ...@@ -10,14 +10,14 @@ import numpy as np
import pytest import pytest
import scipy as sp import scipy as sp
import tensorflow as tf import tensorflow as tf
from tensorflow.keras import layers from pytests_utils import parametrize_idtype
from test_utils import parametrize_idtype from pytests_utils.graph_cases import (
from test_utils.graph_cases import (
get_cases, get_cases,
random_bipartite, random_bipartite,
random_dglgraph, random_dglgraph,
random_graph, random_graph,
) )
from tensorflow.keras import layers
def _AXWb(A, X, W, b): def _AXWb(A, X, W, b):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment