Skip to content

Commit

Permalink
Minor func name edit
Browse files Browse the repository at this point in the history
  • Loading branch information
djperrefort committed Dec 7, 2023
1 parent bed939f commit ad52830
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/utils/test_exclude_active_slurm_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
class ExcludeSlurmUsers(unittest.TestCase):
"""Test the identification of slurm users from a DataFrame of process data"""

def test_exclude_slurm_users(self) -> None:
"""Test slurm processes are excluded from the returned DataFrame"""
def test_exclude_al_processes_for_user(self) -> None:
"""Test users with slurm processes are excluded from the returned DataFrame"""

# User 1002 has two processes.
# They BOTH should be excluded because ONE of them is a slurm process.
input_df = pd.DataFrame({
'UID': [1001, 1002, 1002, 1003, 1004],
'CMD': ['process 1', 'slurmd ...', 'process 3', 'process 4', 'process5']})
'CMD': ['process 1', '... slurmd ...', 'process 3', 'process 4', 'process5']})

expected_df = input_df.loc[[0, 3, 4]]
returned_df = exclude_active_slurm_users(input_df)
Expand All @@ -37,8 +37,8 @@ def test_all_slurm_users(self) -> None:
"""Test the returned dataframe is empty when all process container `slurmd`"""

input_df = pd.DataFrame({
'UID': [1001, 1002, 1003],
'CMD': ['slurmd', 'prefix slurmd', 'slurmd postfix']})
'UID': [1001, 1002, 1003, 1004],
'CMD': ['slurmd', 'prefix slurmd', 'slurmd postfix', 'prfix slurmd postfix']})

returned_df = exclude_active_slurm_users(input_df)
self.assertTrue(returned_df.empty)

0 comments on commit ad52830

Please sign in to comment.