Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/test_mig_shared_safeeval.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# test_mig_shared_safeeval - unit test of the corresponding mig shared module
# Copyright (C) 2003-2025 The MiG Project by the Science HPC Center at UCPH
# Copyright (C) 2003-2026 The MiG Project by the Science HPC Center at UCPH
#
# This file is part of MiG.
#
Expand Down Expand Up @@ -39,7 +39,7 @@
PWD_BYTES = PWD_STR.encode('utf8')


class MigSharedSafeeval(MigTestCase):

Check failure on line 42 in tests/test_mig_shared_safeeval.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

unused class 'MigSharedSafeeval' (60% confidence)

Check failure on line 42 in tests/test_mig_shared_safeeval.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

unused class 'MigSharedSafeeval' (60% confidence)
"""Wrap unit tests for the corresponding module"""

def test_subprocess_call(self):
Expand All @@ -49,9 +49,9 @@

def test_subprocess_call_invalid(self):
"""Check that pwd call with invalid arg fails"""
retval = subprocess_call(['pwd', '-h'], stderr=subprocess_pipe)
retval = subprocess_call(['pwd', '--invalid'], stderr=subprocess_pipe)
self.assertNotEqual(retval, 0,
"unexpected subprocess call nosuchcommand retval")
"unexpected subprocess call pwd invalid arg retval")

def test_subprocess_check_output(self):
"""Check that pwd command output matches getcwd as bytes"""
Expand Down Expand Up @@ -79,7 +79,7 @@

def test_subprocess_popen_text(self):
"""Check that pwd popen output matches getcwd as string"""
orig = os.getcwd()

Check failure on line 82 in tests/test_mig_shared_safeeval.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

unused variable 'orig' (60% confidence)

Check failure on line 82 in tests/test_mig_shared_safeeval.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

unused variable 'orig' (60% confidence)
proc = subprocess_popen(['pwd'], stdout=subprocess_pipe,
stderr=subprocess_stdout, text=True)
retval = proc.wait()
Expand Down
Loading