Using bugs

In order to use bugs, you should firstly creat a python virtual environment. To create a new python virtual environment, you need to install virtualenv library in python using the following command.

# pip install virtualenv

Next, you need to create a virtual environment based on the required version of python mentioned in the config file of the bug. You can use the following command to create a new virtual environment.

# python -m virtualenv --python=/usr/bin/python3.x venv
x refers to the version of python (e.g. python3.6, python3.7, etc)

Next, you can activate the created virtual environment using the following command.

# source venv/bin/activate

In the next step, you need to install all dependencies required for running the buggy and fixed versions.

# pip install -r requirements.txt

Finally, you can use the following command to run provided test case executing both buggy and fixed versions.

# pytest


Using shell script

Users also can use following content as a shell script to do everything semi-automatic.

python -m virtualenv --python=/usr/bin/python3.x venv
source venv/bin/activate
pip install -r requirements.txt
pytest

Copyright © 2021. All rights reserved.