You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for doing this testing! I apologize for how long it is and please let me know if you have any questions!
Setup:
Clone the test repo from here or use your own repo of pytests.
Launch VSCode and open the inc_dec_example_repo/inc_dec_example_test_suite testing repo folder.
Add the following to your settings in VSCode: "python.experiments.optInto": ["pythonTestAdapter"],
Use the "create environment" command from the command palette, select venv and a Python version >=3.7.
In the terminal, run python -m pip install pytest.
From the command palette, run "python: configure tests", select pytest and then "." (root directory)
General:
Run the tests and then cancel the test run. Check that there are no spinning icons indicating unresolved actions.
Debug the tests, then cancel. Again, ensure no spinning icons appear. You should try canceling using both the stop button in the test explorer panel and in the debug controller.
Execute a large number of tests to ensure that the test run completes.
Verify that test run and logging function correctly by referring to test_logging.py. Ensure that ALL the expected output gets printed. Compare the output in VSCode with what you get when running pytest directly from the command line for the test_logging file.
Run a test that has a segmentation fault, make sure it resolves correctly and displays a helpful message.
The text was updated successfully, but these errors were encountered:
Causing a segmentation fault in Python intentionally is not recommended, as it can lead to unpredictable behavior and potentially harm your system or data. Segmentation faults typically occur when a program tries to access a memory location that it doesn't have permission to access. However, if you are doing this for educational or debugging purposes, you can force a segmentation fault in Python using the ctypes library and some low-level C code. Here's how you can do it:
importctypes# Attempt to access an invalid memory locationctypes.string_at(0)
When you run this code, it will most likely result in a segmentation fault and crash the Python interpreter.
Again, please be cautious when intentionally causing segmentation faults, as it can have unintended consequences and may lead to system instability. It's always better to handle errors gracefully in your code rather than intentionally crashing it.
Refs: #21876
Complexity: 4
Author: @eleanorjboyd
Create Issue
Thank you for doing this testing! I apologize for how long it is and please let me know if you have any questions!
Setup:
inc_dec_example_repo/inc_dec_example_test_suite
testing repo folder."python.experiments.optInto": ["pythonTestAdapter"],
venv
and a Python version >=3.7.python -m pip install pytest
.pytest
and then "." (root directory)General:
test_logging.py
. Ensure that ALL the expected output gets printed. Compare the output in VSCode with what you get when runningpytest
directly from the command line for thetest_logging
file.The text was updated successfully, but these errors were encountered: