Skip to content

Commit

Permalink
Merge pull request #316 from petertseng/lsp
Browse files Browse the repository at this point in the history
largest-series-product: Do not test slices
behrtam committed Mar 13, 2016
2 parents 180fd02 + da69eae commit 6035bd2
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions exercises/largest-series-product/largest_series_product_test.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
"""Tests for the largest-series-product exercise
Implementation note:
In case of invalid inputs to the 'slices' or 'largest_product' functions
In case of invalid inputs to the 'largest_product' function
your program should raise a ValueError with a meaningful error message.
Feel free to reuse your code for the series exercise!
"""
import unittest

from series import largest_product, slices
from series import largest_product


class SeriesTest(unittest.TestCase):
def test_slices_of_two(self):
self.assertEqual([[9, 7], [7, 8], [8, 6], [6, 7],
[7, 5], [5, 6], [6, 4]],
slices("97867564", 2))

def test_overly_long_slice(self):
with self.assertRaises(ValueError):
slices("012", 4)

def test_largest_product_of_2(self):
self.assertEqual(72, largest_product("0123456789", 2))

0 comments on commit 6035bd2

Please sign in to comment.