Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Exercise 2 (edge cases) #7

Description

@alessandrofelder

Edge cases of compute_overlap

We've discussed edge cases in class. Edge cases help us check that our compute_overlap function behaves correctly when it gets passed different types of valid input.

For example, some edge cases that we haven't tested yet are:

  • two time ranges that partially overlap
  • two time ranges that don't overlap (see Exercise 1+ (no overlap) #6 )
  • two time ranges that both have multiple sub-time-ranges
  • two time ranges with one starting exactly at the same time as the other ends
  • two time ranges that exactly coincide
  • ...

Write an edge case test

In this exercise, your job is to add a further test to test_times.py that checks one of these edge cases.
This new test will have a similar structure as before.
Remember to run the tests and check that they pass before pushing to your repository.
If you find any bugs, have a go at fixing them.

Once you're happy with your additional test, commit your changes to your repository with a meaningful commit message that also links to this issue.

> git add test_times.py
> git commit -m "<meaningful commit message here>. Answers UCL-RITS/ipls-workshop#7"

and push it to your fork.

> git push

Further exercises

If you've gotten this far, well done! 🚀
You've finished exercise 2. You can add more tests for the other edge cases if you like.
Otherwise, here are some more exercises to keep you busy:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions