programming-formalisms / programming_formalisms_project_autumn_2024

Learners' project of the Programming Formalisms course of autumn 2024
GNU General Public License v3.0
0 stars 0 forks source link

Write `create_test_gradient` and `is_gradient` #32

Open richelbilderbeek opened 1 week ago

richelbilderbeek commented 1 week ago

Needed for #13

Tests:

assert is_gradient.__doc__
assert is_gradient("nonsense") == False
assert is_gradient(create_test_gradient()) == True
emiliamoralest commented 1 week ago

completed in is_gradient.py

richelbilderbeek commented 1 week ago

I've seen the code in learners/src/is_gradient.py. Well done!

However, this code is not part of the project yet, hence it cannot be used by others yet. To solve this:

Also, the function create_test_gradient is undefined. Please create and test it. Here are some minimal tests:

assert create_test_gradient.__doc__

Because this function is missing, the test below will fail:

assert is_gradient(create_test_gradient()) == True

Please check if your tests pass next time, especially before pushing to the main branch :+1:

Good luck!