Coverage for src/tests/test_subtract.py: 100%

1 import remedapy as R

2

3

4 class TestSubtract:

5 def test_data_first(self):

6 # R.subtract(value, subtrahend);

7 assert R.subtract(10, 5) == 5

8 assert R.subtract(10, -5) == 15

9 assert R.reduce([1, 2, 3, 4], R.subtract, 20) == 10

10

11 def test_data_last(self):

12 # R.subtract(subtrahend)(value);

13 assert R.subtract(5)(10) == 5

14 assert R.subtract(-5)(10) == 15

15 assert list(R.map([1, 2, 3, 4], R.subtract(1))) == [0, 1, 2, 3]