From bfa1201e5fe2bfaf38575dfa0f851820da3a073f Mon Sep 17 00:00:00 2001 From: Mohamed Elnageeb Date: Sun, 5 Jan 2025 21:28:38 +0200 Subject: [PATCH] Revert "Merge branch '43-distinct-subsequences' of https://github.com/MIT-Emerging-Talent/ET6-foundations-group-24 into 43-distinct-subsequences" This reverts commit 058e9873453adb12da84509127114b667f99ff96, reversing changes made to dc24260e45bc39b41534624c957ca34a03683785. --- solutions/tests/test_distinct_subsequences.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/solutions/tests/test_distinct_subsequences.py b/solutions/tests/test_distinct_subsequences.py index fbf60a287..513910386 100644 --- a/solutions/tests/test_distinct_subsequences.py +++ b/solutions/tests/test_distinct_subsequences.py @@ -26,6 +26,7 @@ class TestCountDistinctSubsequences(unittest.TestCase): """Test suite for the count_distinct_subsequences function.""" # Standard cases + def test_matching_subsequence(self): """Test matching subsequences in typical strings.""" s = "rabbbit" @@ -45,6 +46,7 @@ def test_full_match(self): self.assertEqual(count_distinct_subsequences(s, t), 1) # Edge cases + def test_empty_target(self): """Test when the t string is empty (always one way to match).""" s = "abc" @@ -76,9 +78,7 @@ def test_large_strings(self): s = "a" * 10000 t = "a" * 100 result = count_distinct_subsequences(s, t) - self.assertEqual( - result, 263409560461970212832400 - ) # number of ways to choose 10 a's from 1000 a's + self.assertGreater(result, 0) # Ensure it computes without errors # Defensive tests