Skip to content

Commit f3fdd2e

Browse files
authored
Updated tests.toml and regenerated test file for Custom-Set. (#3728)
1 parent be41e19 commit f3fdd2e

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

exercises/practice/custom-set/.meta/tests.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ description = "Difference (or Complement) of a set is a set of all elements that
114114
[c5ac673e-d707-4db5-8d69-7082c3a5437e]
115115
description = "Difference (or Complement) of a set is a set of all elements that are only in the first set -> difference of two non-empty sets is a set of elements that are only in the first set"
116116

117+
[20d0a38f-7bb7-4c4a-ac15-90c7392ecf2b]
118+
description = "Difference (or Complement) of a set is a set of all elements that are only in the first set -> difference removes all duplicates in the first set"
119+
117120
[c45aed16-5494-455a-9033-5d4c93589dc6]
118121
description = "Union returns a set of all elements in either set -> union of empty sets is an empty set"
119122

exercises/practice/custom-set/custom_set_test.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/custom-set/canonical-data.json
3-
# File last updated on 2023-12-27
3+
# File last updated on 2024-07-08
44

55
import unittest
66

@@ -196,6 +196,12 @@ def test_difference_of_two_non_empty_sets_is_a_set_of_elements_that_are_only_in_
196196
expected = CustomSet([1, 3])
197197
self.assertEqual(set1 - set2, expected)
198198

199+
def test_difference_removes_all_duplicates_in_the_first_set(self):
200+
set1 = CustomSet([1, 1])
201+
set2 = CustomSet([1])
202+
expected = CustomSet()
203+
self.assertEqual(set1 - set2, expected)
204+
199205
def test_union_of_empty_sets_is_an_empty_set(self):
200206
set1 = CustomSet()
201207
set2 = CustomSet()

0 commit comments

Comments
 (0)