Skip to content

Commit

Permalink
More test fixes
Browse files Browse the repository at this point in the history
User Support Ticket(s) or Story Referenced: TRILFRAME-522
  • Loading branch information
sebrowne committed Dec 15, 2022
1 parent 63d425f commit 39775a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def mock_nvidia_smi():
"GPU 2: Tesla V100S-PCIE-32GB (UUID: GPU-somehash3)",
"GPU 3: Tesla V100S-PCIE-32GB (UUID: GPU-somehash4)"]

def mock_which(thing_to_find):
return os.path.join(os.getcwd(), thing_to_find)
def mock_which_not_found(_):
return None


#==============================================================================
Expand Down Expand Up @@ -70,6 +70,6 @@ def test_nvidia_smi_output_without_smi(self):
Test that without nvidia-smi available the smi interface returns an empty list of output.
"""
print("")
with patch("trilinosprhelpers.sysinfo.gpu_utils.which", side_effect=mock_which):
with patch("trilinosprhelpers.sysinfo.gpu_utils.which", side_effect=mock_which_not_found):
ret = sysinfo.gpu_utils._nvidia_smi()
self.assertEqual([], ret)
4 changes: 2 additions & 2 deletions packages/framework/pr_tools/unittests/test_LaunchDriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ def setUp(self):

## Test LaunchDriver methods
def testUnitGetLaunchEnv(self):
env = ld.get_launch_env(self.build_name, "dne")
env = ld.get_launch_env("dne")
self.assertEqual(env, "")


def testUnitGetLaunchCmd(self):
cmd = ld.get_launch_cmd(self.build_name, "dne")
cmd = ld.get_launch_cmd("dne")
self.assertEqual(cmd, " ")


Expand Down

0 comments on commit 39775a0

Please sign in to comment.