Python Bootcamp for Data Week 3 assignment
This week, you learned the basics of Python testing. From a brief overview of the standard library to using a more modern approach with Pytest, one of the most popular testing libraries in Python. You'll use that knowledge to complete the assignment in this repository, where you'll write tests, fix broken tests, and debug issues in real-world code.
💡 This template repository is made for GitHub Classroom delivery, but can be used independently if you want to learn on your own.
Access the full course on edX.org
This repository uses automated grading (or testing). When starting, all automated tests will fail. Your task is to make them all pass.
- Go to the tests directory and fix the invalid.py so that Pytest automatically collects it.
- Update the three tests inside invalid.py so that Pytest can run them.
- Go to the tests/test_utils.py test file and fix the three tests that aren't passing.
- Repeat the fix/push/verify cycle until all tests are passing and the actions tab shows a green.
💡 As part of the GitHub Classroom setup, you might get an automated Pull Request created for direct feedback by your Professor or by the TAs.
Verify your work by running pytest -v in the root of your repository. If you are using Codespaces, pytest will already be installed for you and available for you to run tests that are used for auto-grading.
Use the linked resources in this section to review and reference any of the previously covered content. All questions in this assignment come from content previously covered in the bootcamp course.
In this assignment, you'll use GitHub Copilot. If you are using Codespaces, then the extension is already installed for you. Otherwise you can search for it in extensions on Visual Studio Code, and then install it.
If you have an educational email address (usually one that ends on .edu) then you can validate your student or faculty status by following this guide
Copilot is an AI-assistive technology that will suggest you completions that you must verify as correct. Suggestions are accepted by hitting the Tab key. You can also write a prompt as a comment. Suggestions will be generated after you hit the Enter or Return keys.
Use the following videos from Microsoft as a reference on how to get started.
- week 1: Introduction to Python
- Week 2: Python Functions and Classes
- Week 3: Testing In Python
- Week 4: Introduction to Pandas and Numpy
- Testing In Python book
- Minimal Python book
- Free Azure Certification for Students
- Python for Beginners Learn Path
🎥 Click the image below to access this course on edX.org
You can also find this course on the Coursera Platform
This assignment is for Week 3 (out of 4) of the Python Bootcamp for Data. The whole course has four weeks:
- week 1: Introduction to Python
- Week 2: Python Functions and Classes
- Week 3: Testing In Python
- Week 4: Introduction to Pandas and NumPy
Open the bonus directory and then look into the main.py file. It has several functions that could use some refactoring and unit tests. The tasks are marked with #TODO comments. Follow the instructions for each comment. This bonus assignment is not graded and will not trigger auto-grading. It is meant to be a challenge for you to practice what you learned in the course.
