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

Separate data into a fixture #92

Open
alessandrofelder opened this issue Nov 5, 2020 · 0 comments
Open

Separate data into a fixture #92

alessandrofelder opened this issue Nov 5, 2020 · 0 comments
Labels

Comments

@alessandrofelder
Copy link
Collaborator

alessandrofelder commented Nov 5, 2020

Separating data from code

Your parametrised bit 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: []

A sample solution to this exercise can be seen here.

twemyss added a commit to twemyss/rse-classwork-2020 that referenced this issue Nov 5, 2020
ucapgum referenced this issue in ucapgum/rse-classwork-2020 Nov 6, 2020
umitozmen added a commit to umitozmen/rse-classwork-2020 that referenced this issue Nov 8, 2020
nikoSchoinas referenced this issue in nikoSchoinas/rse-classwork-2020 Nov 11, 2020
DavidScobie added a commit to DavidScobie/rse-classwork-2020 that referenced this issue Nov 17, 2020
rmapjs1 added a commit to rmapjs1/rse-classwork-2020 that referenced this issue Dec 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant