File tree Expand file tree Collapse file tree 3 files changed +29
-1
lines changed
Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Original file line number Diff line number Diff line change 1717 run : pip install --upgrade -r requirements.txt
1818 - name : fetch upstream cheat sheets
1919 run : python lib/fetch.py fetch-all
20- - name : run tests
20+ - name : run bash tests
2121 run : bash tests/run-tests.sh
22+ - name : run pytest
23+ run : pytest lib/
2224
2325 docker :
2426 runs-on : ubuntu-20.04
Original file line number Diff line number Diff line change 1+ from cheat_wrapper import _add_section_name
2+
3+ unchanged = """
4+ python/:list
5+ ls
6+ btrfs~volume
7+ :intro
8+ :cht.sh
9+ python/copy+file
10+ python/rosetta/:list
11+ emacs:go-mode/:list
12+ """
13+
14+ split = """
15+ python copy file
16+ python/copy file
17+ """
18+
19+ def test_header_split ():
20+ for inp in unchanged .strip ().splitlines ():
21+ assert inp == _add_section_name (inp )
22+
23+ for test in split .strip ().split ('\n \n ' ):
24+ inp , outp = test .split ('\n ' )
25+ assert outp == _add_section_name (inp )
Original file line number Diff line number Diff line change 1515colorama
1616pyyaml
1717python-Levenshtein
18+ pytest
You can’t perform that action at this time.
0 commit comments