### Installing MinGW and Toolchain on Windows Source: https://github.com/conan-io/conan/blob/develop2/test/README.md Commands to install MinGW-w64 (64-bit and 32-bit) toolchains, base development tools, GCC, autoconf, and automake using pacman within an MSYS2 terminal. ```bash $ pacman -Syuu $ pacman -S mingw-w64-x86_64-toolchain $ pacman -S mingw-w64-i686-toolchain $ pacman -S base-devel gcc $ pacman -S autoconf-wrapper $ pacman -S automake ``` -------------------------------- ### Install Python Requirements for Conan Source: https://github.com/conan-io/conan/blob/develop2/README.md Installs the necessary Python packages for running Conan tests. Ensure you are in the root directory of the Conan project. ```bash python -m pip install -r conans/requirements.txt ``` ```bash python -m pip install -r conans/requirements_server.txt ``` ```bash python -m pip install -r conans/requirements_dev.txt ``` -------------------------------- ### Run Conan Help Command Source: https://github.com/conan-io/conan/blob/develop2/README.md Verify Conan installation by running the 'conan --help' command. This displays available consumer commands. ```bash conan --help ``` -------------------------------- ### Install Conan in Editable Mode Source: https://github.com/conan-io/conan/blob/develop2/README.md Install Conan from source in editable mode using pip. On Windows, 'sudo' is not required. For some Linux distributions, creating a virtual environment 'venv' first is mandatory. ```bash cd conan-io && sudo pip install -e . ``` -------------------------------- ### Run Specific Conan Test Source: https://github.com/conan-io/conan/blob/develop2/README.md Executes a specific Conan test case. Replace the example path and test name with the desired test. ```bash python -m pytest test/functional/command/export_test.py::TestRevisionModeSCM::test_revision_mode_scm -s ``` -------------------------------- ### Test File Naming Convention Source: https://github.com/conan-io/conan/blob/develop2/test/README.md Test files should be named starting with 'test_' to be discovered by Pytest. ```tree test ├── README.md ├── conftest.py ├── unittests │   ├── __init__.py │   ├── test_mytest.py │ ... ... ``` -------------------------------- ### Configure Artifactory Connection for Tests Source: https://github.com/conan-io/conan/blob/develop2/README.md Sets environment variables to connect to a local Artifactory instance for testing. Adjust URL, user, and password as needed. ```bash export CONAN_TEST_WITH_ARTIFACTORY=1 ``` ```bash export ARTIFACTORY_DEFAULT_URL=http://localhost:8081/artifactory ``` ```bash export ARTIFACTORY_DEFAULT_USER=admin ``` ```bash export ARTIFACTORY_DEFAULT_PASSWORD=password ``` -------------------------------- ### Run Conan Tests with Artifactory Source: https://github.com/conan-io/conan/blob/develop2/README.md Executes Conan tests that require an Artifactory instance. Ensure the necessary environment variables for Artifactory connection are set. ```bash python -m pytest . -m artifactory_ready ``` -------------------------------- ### Clone Conan Repository Source: https://github.com/conan-io/conan/blob/develop2/README.md Clone the Conan repository to your local machine. Ensure the directory name is 'conan-io' as other names might cause issues with tests. ```bash git clone https://github.com/conan-io/conan.git conan-io ``` -------------------------------- ### Run All Conan Tests Source: https://github.com/conan-io/conan/blob/develop2/README.md Executes the entire Conan test suite using pytest. This command should be run from the root directory of the Conan project. ```bash python -m pytest . ``` -------------------------------- ### Parametrizing Tests with Pytest Source: https://github.com/conan-io/conan/blob/develop2/test/README.md Utilize the 'pytest.mark.parametrize' decorator to run the same test logic with different input values. ```python @pytest.mark.parametrize("use_components", [False, True]) def test_build_modules_alias_target(self, use_components): ... ``` -------------------------------- ### Test Method Naming Convention Source: https://github.com/conan-io/conan/blob/develop2/test/README.md Test functions or methods within test files should be prefixed with 'test_'. ```python class TestSomeFunctionality: def test_plus_name(self): client = TestClient() conanfile = textwrap.dedent(""" ... ``` ``` -------------------------------- ### Marking Tests with Pytest and Tool Markers Source: https://github.com/conan-io/conan/blob/develop2/test/README.md Use Pytest markers for built-in functionality and custom tool markers like 'cmake', 'gcc', etc., for tests requiring specific external tools. These should be placed in the 'test/functional' folder. ```python @pytest.mark.skipif(platform.system() != "Windows", reason="Needs windows for vcvars") @pytest.mark.tool("visual_studio") def test_vcvars_priority(self): client = TestClient() ... ``` -------------------------------- ### Set PYTHONPATH Environment Variable Source: https://github.com/conan-io/conan/blob/develop2/README.md Configures the PYTHONPATH environment variable to include the current directory. This is essential for the test suite to find Conan modules. ```bash export PYTHONPATH=$PYTHONPATH:$(pwd) ``` ```bash set PYTHONPATH=. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.