Gen-AI Developer Classroom notes 22/Mar/2025

Unit Testing

  • Goal of unit testing is to identify as many defects as possible in early stages
  • Unit Testing: We test a unit of code with all possibilities
  • Unit Tests are supposed to be executed after every change by any member of the team to the code.

Unit Testing Frameworks

Lets build a application which is library application

  • Create a new folder
  • activate virtual environment
  • Install pytest packages
pip install pytest pytest-cov
  • create a requirements.txt file
  • configure testing in vscode as discussed in the classs
  • Exercise: Write unit tests for inventory (json, yaml)

By continuous learner

enthusiastic technology learner

Leave a Reply

Discover more from Direct AI Powered By Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading