pytest.main()为什么填入参数没有用

问题遇到的现象和发生背景

我运行pytest.main([])的时候为什么我填入什么参数他都没效果,错的参数也不会报错,对的也不会按参数执行。

问题相关代码,请勿粘贴截图

import pytest
class Test_case:
def test_01(self):
print('1')
@pytest.mark.test
def test_02(self):
print('2')
if name == 'main':
pytest.main(['-s','-m test'])

运行结果及报错内容

collecting ... collected 2 items

test_runnrt.py::Test_case::test_01 PASSED [ 50%]1

test_runnrt.py::Test_case::test_02 PASSED [100%]2

Process finished with exit code 0

我的解答思路和尝试过的方法

然后我把pytest.main(['aksdjkad']) 乱填参数执行出来也不报错 也是上面的这个结果 为什么啊。 我设置里也选了pytest运行的啊

我想要达到的结果