typo, added docstrings

pull/339/head
evelynmitchell 1 year ago
parent 6714b584a5
commit 552b7c10ea

@ -1,8 +1,11 @@
iimport pytest """Tests for the sys_info module."""
import pytest
from unittest.mock import Mock from unittest.mock import Mock
from your_module import interpreter_info, system_info # replace with your actual module name from your_module import interpreter_info, system_info # replace with your actual module name
def test_interpreter_info(mocker): def test_interpreter_info(mocker):
"""Test interpreter_info."""
mocker.patch('subprocess.check_output', return_value='curl output') mocker.patch('subprocess.check_output', return_value='curl output')
interpreter = Mock() interpreter = Mock()
interpreter.offline = True interpreter.offline = True
@ -21,6 +24,7 @@ def test_interpreter_info(mocker):
assert 'curl output' in result assert 'curl output' in result
def test_system_info(mocker): def test_system_info(mocker):
"""Test system_info."""
mocker.patch('your_module.get_oi_version', return_value=('cmd_version', 'pkg_version')) # replace with your actual module name mocker.patch('your_module.get_oi_version', return_value=('cmd_version', 'pkg_version')) # replace with your actual module name
mocker.patch('your_module.get_python_version', return_value='python_version') # replace with your actual module name mocker.patch('your_module.get_python_version', return_value='python_version') # replace with your actual module name
mocker.patch('your_module.get_pip_version', return_value='pip_version') # replace with your actual module name mocker.patch('your_module.get_pip_version', return_value='pip_version') # replace with your actual module name

Loading…
Cancel
Save