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

Test_parse_rgb_number #8

Merged
merged 13 commits into from
Jun 17, 2024
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,22 @@ Running `coverage html` and opening the document in the browser gives the follow

<Provide the same kind of information provided for Function 1>

Thijmen
#### Thijmen

\_human_join

[commit](https://github.com/tthijm/sep/commit/88c98ebc05c4d67bcdce7d3046ffa786f79b9284)

![](./assets/_human_join_custom.png)

#### Frank

parse_rgb_number

[commit](https://github.com/tthijm/sep/commit/45156c574d1be11a2da25e0f74efe866d3e2cc97)

![](./assets/parse_rgb_number_custom.png)

## Coverage improvement

### Individual tests
Expand All @@ -68,7 +76,7 @@ Thijmen

<Provide the same kind of information provided for Test 1>

Thijmen
#### Thijmen

test\_\_human_join

Expand All @@ -81,6 +89,18 @@ test\_\_human_join
The coverage improvement is +100%.
The coverage has been improved, because `_human_join` used to not be tested, while the new `test__human_join` considers every branch to be taken.

#### Frank

test_from_str_failures

[commit](https://github.com/tthijm/sep/commit/51a7b35a9b4af8058cc9d513085b02306ae63a43)

![](./assets/parse_rgb_number_before.png)

![](./assets/parse_rgb_number_after.png)

The coverage of the function has improved from the originaly 60% to 100%, since the other two branches (1 and 3) were also covered.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original coverage should be taken from coverage which was 78%.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks


### Overall

<Provide a screenshot of the old coverage results by running an existing tool (the same as you already showed above)>
Expand Down
Binary file added assets/parse_rgb_number_after.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/parse_rgb_number_before.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/parse_rgb_number_custom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions tests/test_colour.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ def test_from_str(value, expected):
'rgb(30, -1, 60)',
'invalid(a, b, c)',
'rgb(',
'rgb(120%,100%,90%)',
'rgb(320,300,300)',
],
)
def test_from_str_failures(value):
Expand Down
Loading