Simple library function in Python to find if a given sequence appears in the array somewhere.
Initially the test function test_one_element_sequence()
was added.
Then enough code was written to make this test function pass.
This TDD process was followed until sufficient test cases were written and code modified to make all tests pass.
##Usage The source code should be in the following directory structure:
- Root folder
- array_util
__init__.py
(empty file)array_util.py
- tests
test_sequence_in_array.py
- array_util
From the command line, cd
to the tests folder and run
python test_sequence_in_array.py
##Development environment The code was written on a Windows 7 machine with Python 3.5.1.