$ python kwfind.py ./dir ^[a-zA-Z]+_TESTResult.*
Or:
$ python kwfind.py ./dir "^(\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]\d{3}[\s.-]\d{4}$"
- Expect if missing both arguments:
- Return
TypeError
.
- Return
- Expect if both empty string arguments:
- Print
Invalid directory
and returnNone
.
- Print
- Expect if directory doesn't exist in filesystem:
- Print
Invalid directory
and returnNone
.
- Print
- Expect if
(x, y)
passed:- Return dictionary whose count matches tuples in mock(s) of
os.walk()
.
- Return dictionary whose count matches tuples in mock(s) of
- Expect if
(x, y)
passed:- Print
z found
and additional formatted text.
- Print
- Expect if invalid regex:
- Rrint
Invalid...
and returnNone
.
- Rrint
os.walk()
- Module should not fail on Python 2.7.x - 3.x.
- Module should print missing packages if not installed.
- Module should not fail on Windows, Mac, and Linux systems.
- Calculate time and space complexity and investigate:
- Multithreaded approach
- Distributed approach