Skip to content

Commit c754d41

Browse files
committed
added test location page
1 parent bc1b378 commit c754d41

25 files changed

+1216
-556
lines changed

_downloads/add_book_data.py

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/usr/bin/env python
2+
3+
"""
4+
sample data for persistence/serializatiion examples
5+
6+
This version is nested, with more stucture
7+
- can be saved with pickle, JSON, xml...
8+
"""
9+
10+
AddressBook = [ {'first_name': "Chris",
11+
'last_name': "Barker",
12+
'address' : {'line_1':"835 NE 33rd St",
13+
'line_2' : "",
14+
'city' : "Seattle",
15+
'state': "WA",
16+
'zip': "96543"},
17+
'email' : "PythonCHB@gmail.com",
18+
'home_phone' : "206-555-1234",
19+
'office_phone' : "123-456-7890",
20+
'cell_phone' : "234-567-8901",
21+
},
22+
23+
{'first_name': "Fred",
24+
'last_name': "Jones",
25+
'address' : {'line_1':"123 SE 13th St",
26+
'line_2' : "Apt. 43",
27+
'city' : "Tacoma",
28+
'state': "WA",
29+
'zip': "93465"},
30+
'email' : "FredJones@some_company.com",
31+
'home_phone' : "510-555-1234",
32+
'office_phone' : "564-466-7990",
33+
'cell_phone' : "403-561-8911",
34+
},
35+
36+
{'first_name': "Nancy",
37+
'last_name': "Wilson",
38+
'address' : {'line_1':"8654 Walnut St",
39+
'line_2' : "Suite 567",
40+
'city' : "Pasadena",
41+
'state': "CA",
42+
'zip': "12345"},
43+
'email' : "Wilson.Nancy@gmail.com",
44+
'home_phone' : "423-321-9876",
45+
'office_phone' : "123-765-9877",
46+
'cell_phone' : "432-567-8466",
47+
},
48+
]
49+

_downloads/add_book_data_flat.py

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/usr/bin/env python
2+
3+
"""
4+
sample data for persistence/serialization examples
5+
this version is flat for saving in CSV, ini, etc.
6+
"""
7+
8+
AddressBook = [ {'first_name': "Chris",
9+
'last_name': "Barker",
10+
'address_line_1':"835 NE 33rd St",
11+
'address_line_2' : "",
12+
'address_city' : "Seattle",
13+
'address_state': "WA",
14+
'address_zip': "96543",
15+
'email' : "PythonCHB@gmail.com",
16+
'home_phone' : "206-555-1234",
17+
'office_phone' : "123-456-7890",
18+
'cell_phone' : "234-567-8901",
19+
},
20+
21+
{'first_name': "Fred",
22+
'last_name': "Jones",
23+
'address_line_1':"123 SE 13th St",
24+
'address_line_2' : "Apt. 43",
25+
'address_city' : "Tacoma",
26+
'address_state': "WA",
27+
'address_zip': "93465",
28+
'email' : "FredJones@some_company.com",
29+
'home_phone' : "510-555-1234",
30+
'office_phone' : "564-466-7990",
31+
'cell_phone' : "403-561-8911",
32+
},
33+
34+
{'first_name': "Nancy",
35+
'last_name': "Wilson",
36+
'address_line_1':"8654 Walnut St",
37+
'address_line_2' : "Suite 567",
38+
'address_city' : "Pasadena",
39+
'address_state': "CA",
40+
'address_zip': "12345",
41+
'email' : "Wilson.Nancy@gmail.com",
42+
'home_phone' : "423-321-9876",
43+
'office_phone' : "123-765-9877",
44+
'cell_phone' : "432-567-8466",
45+
},
46+
]
47+

_sources/index.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ In This Collection
2323

2424
weak_references
2525
persistance_serialization
26+
where_to_put_tests
2627

2728
.. rst-class:: credit
2829

0 commit comments

Comments
 (0)