UCL-COMP0233-23-24 / RSE-Classwork

3 stars 67 forks source link

Separating data from code #22

Open dpshelio opened 10 months ago

dpshelio commented 10 months ago

Your parametrised tests now probably got a bit too big and difficult to read. Create a fixture.yaml file where you can store what you parametrised before in a more human readable way.

Load the yaml file within the test and use it that structure to feed the parametrize test.

The fixture.yaml could look like:

- generic:
    time_range_1: ...
    time_range_2: ...
    expected:
        - ...
        - ...
- no_overlap:
    time_range_1: ...
    time_range_2: ...
    expected: []

Once you have a solution, commit it including Answers UCL-COMP0233-23-24/RSE-Classwork#22 in the message and push it to your fork on GitHub.


Sample solution