# say / test / test_show.py

 ```Jonathan Eunice ea1a709 2012-11-13 Jonathan Eunice c354679 2012-11-13 Jonathan Eunice ea1a709 2012-11-13 Jonathan Eunice c354679 2012-11-13 Jonathan Eunice ea1a709 2012-11-13 ``` ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48``` ```from say import Show, Say show = Show(where=False, retvalue=True) def test_basic(param = 'Yo'): a = 1 b = 3.141 c = "something else!" assert show(a) == 'a: 1' assert show(a, b) == 'a: 1 b: 3.141' assert show(a, b, c) == "a: 1 b: 3.141 c: 'something else!'" assert show(1+1) == '1+1: 2' assert show(len(c), c) == \ "len(c): 15 c: 'something else!'" # anything with paraens in it must be on separate line, given weak parser # of show parameters def test_say_params(): a = 1 b = 3.141 c = "something else!" assert show(a, indent='+1') == ' a: 1' assert show(a, b, sep='\n') == 'a: 1\nb: 3.141' def test_strings(): assert show('this') == "this" x = 44 assert show("x = {x}") == 'x = 44' def test_show_example(): x = 12 nums = list(range(4)) assert show(x) == 'x: 12' assert show(nums) == 'nums: [0, 1, 2, 3]' assert show(x, nums, len(nums)) == \ 'x: 12 nums: [0, 1, 2, 3] len(nums): 4' assert show(x, nums, len(nums), indent='+1') == \ ' x: 12 nums: [0, 1, 2, 3] len(nums): 4' assert show(x, nums, len(nums), sep='\n') == \ 'x: 12\nnums: [0, 1, 2, 3]\nlen(nums): 4' assert show(x, nums, len(nums), sep='\n', indent=1) == \ ' x: 12\n nums: [0, 1, 2, 3]\n len(nums): 4' ```
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.