Sign inSign up free

1445. Make the Failing Tests Pass

medium 20 XP ~12 minHands-on lab

/home/student/semver/semver.py bumps and compares version numbers for the release pipeline. Its tests are in /home/student/semver/tests/. Run them from that folder:

cd /home/student/semver && python3 -m unittest -v

Two tests fail, and last week the pipeline tagged 1.10.0 as older than 1.9.0.

Task

  • All tests pass, without changing anything in tests/.
  • semver.py keeps its two functions, bump(version, part) and compare(a, b). More tests that you can't see will check the same rules on other versions.

About this machine

Ubuntu 24.04 with no internet access. You are student with passwordless sudo. The grader checks the final state of the machine, not the commands you typed. Values like names and ports are generated for you.

Part of Python for DevOps

Teaching or writing about this? Embed this lab on your page

TerminalNot started

Your machine is ready to start

A fresh, isolated Ubuntu machine boots in a few seconds with the task already set up.

No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.