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
Copy file name to clipboardExpand all lines: README.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,16 +5,17 @@ The repository uses pytest as the test writing library for different scenarios u
5
5
Set up pytest in VS code.
6
6
7
7
## Prerequisites
8
-
Before we set up Pytest in VS Code, you need to install the below prerequisites in your operating system,
9
-
* VS Code
10
-
* Python
8
+
Before we set up Pytest in VS Code, you need to install the below prerequisites in your operating system-
9
+
* VS Code
10
+
* Python
11
11
12
12
## Setting Up Pytest In VS Code
13
-
To set up Pytest in VS Code, follow the steps described below
14
-
Pip3 install pytest
15
-
Pip3 show pytest to check the version
13
+
To set up Pytest in VS Code, follow the steps described below-
14
+
Check the pip version installed and use the set up version to work with pytest -
15
+
* Pip3 install pytest
16
+
* Pip3 show pytest : To check the version
16
17
17
-
## Step 1 - Install Python Extension in VS Code
18
+
## Installing Python Extension in VS Code
18
19
Open your VS Code and search for Python on the extensions. You’ll find the Python extension at the top of the search result. Select and click install.
19
20
This allows to work with python interact within VSCode and utilize Github copilot as an agent.
20
21
@@ -24,26 +25,25 @@ Click the flask icon on the left tool bar. You can find this once you open a rep
24
25
Now click on “Configure Python Tests”, select pytest and the test code library
25
26
26
27
After configuring Pytest, VS Code will automatically discover your Unit Tests. You can customise which folder to look for tests in the settings under "python.testing.cwd" parameter in the .vscode/settings.json file.
27
-
## install requests
28
-
* To download and install requests, run this command from the terminal : pip install requests
28
+
## Installing requests
29
+
* To download and install requests, run this command from the terminal : pip install requests
29
30
30
-
## Set up virtual environment
31
+
## Settting up virtual environment
31
32
Pytest works best in virtual environments when using in VSCode. A virtual environment is a built-in way to create an environment. A virtual environment creates a folder that contains a copy (or symlink) to a specific interpreter. When you install packages into a virtual environment it will end up in this new folder, and thus isolated from other packages used by other workspaces.
32
33
Working in virtual environments-
33
34
Pyenv is a library to work with different python environments-
34
-
brew install pyenv
35
-
pyenv install 3.13
35
+
*brew install pyenv
36
+
*pyenv install 3.13
36
37
37
38
## Add libraries to be used in the package to requirements.txt :
0 commit comments