https://github.com/objarni/kata_oogrep
Object oriented grep kata
https://github.com/objarni/kata_oogrep
Last synced: about 1 year ago
JSON representation
Object oriented grep kata
- Host: GitHub
- URL: https://github.com/objarni/kata_oogrep
- Owner: objarni
- Created: 2013-03-22T11:48:36.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2014-05-29T16:03:18.000Z (about 12 years ago)
- Last Synced: 2025-02-06T11:55:20.278Z (over 1 year ago)
- Language: Python
- Size: 234 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Kata: OO grep
=============
The purpose of this kata is to try and implement a "London School Grown" (simple) grep implementation in Python3.
Dependencies
------------
* Python3 (for running grep)
* mockito (for running tests)
* py.test (for running tests)
Running grep
------------
/home/objarni/kata_oogrep$ cd exampledir
/home/objarni/kata_oogrep/exampledir$ python ../grep.py somestring
.. or, which should produce identical output
/home/objarni/kata_oogrep/exampledir$ python ../procedural_grep.py somestring
... which is supposed to produce this output:
File1.txt:1: This is a line with somestring in it.
File1.txt:2: The second line also contains somestring!
File2.txt:10: Line 10 in File2.txt features a somestring also.
Running tests
-------------
/home/objarni/kata_oogrep$ python test_grep.py