Skip to content

About

Template for week 3 assignment

Resources

Stars

5 stars

Watchers

1 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

Repository files navigation

Week 3 assignment

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

edx

Assignment instructions

This repository uses automated grading (or testing). When starting, all automated tests will fail. Your task is to make them all pass.

  1. Go to the tests directory and fix the invalid.py so that Pytest automatically collects it.
  2. Update the three tests inside invalid.py so that Pytest can run them.
  3. Go to the tests/test_utils.py test file and fix the three tests that aren't passing.
  4. 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.

Resources

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.

GitHub Copilot

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.

How to get GitHub Copilot for free

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

How do I use Copilot

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 3 Reference Content

  1. Introduction to testing
  2. Writing useful tests
  3. Test failures

Reading and code resources

Course video and links

🎥 Click the image below to access this course on edX.org

edx

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:

Bonus challenge

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.

About

Template for week 3 assignment

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages