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
+13-11Lines changed: 13 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,31 +23,33 @@ This allows to work with python interact within VSCode and utilize Github copilo
23
23
Now the Python extension installation will automatically install Pytest on your environment. All you need to do is just configure Pytest. Follow the below steps to configure Pytest.
24
24
Click the flask icon on the left tool bar. You can find this once you open a repository that contains Python unit tests.
25
25
Now click on “Configure Python Tests”, select pytest and the test code library
26
-
27
26
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
+
28
28
## Installing requests
29
29
* To download and install requests, run this command from the terminal : pip install requests
30
30
31
31
## Settting up virtual environment
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
+
Pytest is particularly effective in virtual environments when VSCode is utilized. A virtual environment is a way to create an environment that is built-in. A folder is created by a virtual environment that contains a copy to a specific interpreter. Installing packages in a virtual environment will result in a new folder that is isolated from other packages used by other workspaces.
33
33
Working in virtual environments-
34
34
Pyenv is a library to work with different python environments-
35
35
* brew install pyenv
36
36
* pyenv install 3.13
37
37
38
38
## Add libraries to be used in the package to requirements.txt :
39
-
**Set up requirements.txt for required packages**
39
+
**Set up requirements.txt for required packages**
40
40
41
-
* [pydantic](https://docs.pydantic.dev/latest/) - Data validation library for python
* jsonschema : to enable json structure for python
45
+
* pytest-html : plugin for pytest to generate HTML report for results
46
+
* pytest-cov : pytest plugin to render coverage reports.
47
+
* pre-commit : maange pre commit hooks
48
48
49
-
*pip install -r requirements.txt
49
+
To install the set up: pip install -r requirements.txt
50
50
51
51
## Report view in VScode in TEST RESULTS :
52
+
The report view provides report after execution of tests in TEST RESULTS tab in VScode. The results are in html format using pytest-html format of report structure woth pytest-cov that gives stats on test execution and code coverage at the end of each run.
0 commit comments