Skip to content

Commit

Permalink
Replace deprecated load_module()
Browse files Browse the repository at this point in the history
Signed-off-by: coleramos425 <[email protected]>
  • Loading branch information
coleramos425 committed Nov 21, 2024
1 parent 1fea7f8 commit a180f92
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 19 deletions.
3 changes: 1 addition & 2 deletions tests/test_analyze_commands.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import os.path
import shutil
from importlib.machinery import SourceFileLoader
from pathlib import Path
from unittest.mock import patch

import pandas as pd
import pytest
import test_utils

rocprof_compute = SourceFileLoader("rocprof-compute", "src/rocprof-compute").load_module()
rocprof_compute = SourceFileLoader("rocprof-compute", "src/rocprof-compute").exec_module()

baseline_opts = ["rocprof-compute", "analyze"]

Expand Down
11 changes: 1 addition & 10 deletions tests/test_analyze_workloads.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
import inspect
import os.path
import re
import shutil
import subprocess
import sys
from importlib.machinery import SourceFileLoader
from pathlib import Path
from unittest.mock import patch

import pandas as pd
import pytest
import test_utils

rocprof_compute = SourceFileLoader("rocprof-compute", "src/rocprof-compute").load_module()
rocprof_compute = SourceFileLoader("rocprof-compute", "src/rocprof-compute").exec_module()

##################################################
## Generated tests ##
Expand Down
4 changes: 1 addition & 3 deletions tests/test_import_workloads.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
from importlib.machinery import SourceFileLoader
from unittest.mock import patch

import pytest

rocprof_compute = SourceFileLoader("rocprof-compute", "src/rocprof-compute").load_module()
rocprof_compute = SourceFileLoader("rocprof-compute", "src/rocprof-compute").exec_module()

##################################################
## Generated tests ##
Expand Down
5 changes: 1 addition & 4 deletions tests/test_profile_general.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import inspect
import os.path
import re
import shutil
import subprocess
import sys
from importlib.machinery import SourceFileLoader
from pathlib import Path
from unittest.mock import patch

import pandas as pd
import pytest
Expand Down Expand Up @@ -37,7 +34,7 @@
config = {}
config["rocprofiler-compute"] = SourceFileLoader(
"rocprofiler-compute", "src/rocprof-compute"
).load_module()
).exec_module()
config["kernel_name_1"] = "vecCopy(double*, double*, double*, int, int) [clone .kd]"
config["app_1"] = ["./tests/vcopy", "-n", "1048576", "-b", "256", "-i", "3"]
config["cleanup"] = True
Expand Down

0 comments on commit a180f92

Please sign in to comment.