Chapter 12: Problem 9
Using Nose, write four tests for a function called all, prefixes in a module called testprefixes.py that takes a string as its input and returns the set of all nonempty substrings that start with the first character. For example, given the string "lead" as input, all_prefixes would return the set \(\\{\) "', "le", "lea', "lead'). Include a comment explaining what crucial piece of information is missing from the specification for all prefixes that prevents you from testing it fully.
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.