diff --git a/tests/utils/test_exclude_active_slurm_users.py b/tests/utils/test_exclude_active_slurm_users.py index 322de10..ae3fc22 100644 --- a/tests/utils/test_exclude_active_slurm_users.py +++ b/tests/utils/test_exclude_active_slurm_users.py @@ -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) @@ -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)