0% found this document useful (0 votes)
84 views

Full download Python Testing Beginner s Guide 1st Edition Daniel Arbuckle pdf docx

The document provides links to various eBooks available for download, including titles on Python testing, web development, and other subjects. It features a detailed table of contents for the 'Python Testing Beginner's Guide' by Daniel Arbuckle, outlining chapters on testing techniques, tools, and methodologies. The document also includes information about the author and reviewers, as well as publication details.

Uploaded by

fobbsleete2b
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views

Full download Python Testing Beginner s Guide 1st Edition Daniel Arbuckle pdf docx

The document provides links to various eBooks available for download, including titles on Python testing, web development, and other subjects. It features a detailed table of contents for the 'Python Testing Beginner's Guide' by Daniel Arbuckle, outlining chapters on testing techniques, tools, and methodologies. The document also includes information about the author and reviewers, as well as publication details.

Uploaded by

fobbsleete2b
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

Download the Full Version of the Ebook with Added Features ebookname.

com

Python Testing Beginner s Guide 1st Edition Daniel


Arbuckle

https://ebookname.com/product/python-testing-beginner-s-
guide-1st-edition-daniel-arbuckle/

OR CLICK HERE

DOWLOAD NOW

Download more ebook instantly today at https://ebookname.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Python 3 Web Development Beginner s Guide Anders

https://ebookname.com/product/python-3-web-development-beginner-s-
guide-anders/

ebookname.com

Kali Linux Wireless Penetration Testing Beginner s Guide


3rd Edition Cameron Buchanan

https://ebookname.com/product/kali-linux-wireless-penetration-testing-
beginner-s-guide-3rd-edition-cameron-buchanan/

ebookname.com

Learning Processing a beginner s guide to programming


images animation and interaction 1st Edition Daniel
Shiffman
https://ebookname.com/product/learning-processing-a-beginner-s-guide-
to-programming-images-animation-and-interaction-1st-edition-daniel-
shiffman/
ebookname.com

Introducing Microsoft Visual Basic 2005 for developers


Sean Campbell

https://ebookname.com/product/introducing-microsoft-visual-
basic-2005-for-developers-sean-campbell/

ebookname.com
My Teenage Life in India Michael Centore

https://ebookname.com/product/my-teenage-life-in-india-michael-
centore/

ebookname.com

Beaded Crochet Designs 1st Edition Ann Benson

https://ebookname.com/product/beaded-crochet-designs-1st-edition-ann-
benson/

ebookname.com

Past and Present National Identity and the British


Historical Film James Chapman

https://ebookname.com/product/past-and-present-national-identity-and-
the-british-historical-film-james-chapman/

ebookname.com

Colonial Intimacies Interethnic Kinship Sexuality and


Marriage in Southern California 1769 1885 Erika Perez
(Author)
https://ebookname.com/product/colonial-intimacies-interethnic-kinship-
sexuality-and-marriage-in-southern-california-1769-1885-erika-perez-
author/
ebookname.com

Food and the Mid level Farm Thomas A. Lyson

https://ebookname.com/product/food-and-the-mid-level-farm-thomas-a-
lyson/

ebookname.com
Probability and Measure 4th Edition Patrick Billingsley

https://ebookname.com/product/probability-and-measure-4th-edition-
patrick-billingsley/

ebookname.com
Python Testing
Beginner's Guide

An easy and convenient approach to testing your


Python projects

Daniel Arbuckle

BIRMINGHAM - MUMBAI
Python Testing
Beginner's Guide

Copyright © 2010 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system,
or transmitted in any form or by any means, without the prior written permission of the
publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the
information presented. However, the information contained in this book is sold without
warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers
and distributors will be held liable for any damages caused or alleged to be caused directly
or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.

First published: January 2010

Production Reference: 1120110

Published by Packt Publishing Ltd.


32 Lincoln Road
Olton
Birmingham, B27 6PA, UK.

ISBN 978-1-847198-84-6
www.packtpub.com

Cover Image by Vinayak Chittar (vinayak.chittar@gmail.com)


Credits

Author Production Editorial Manager


Daniel Arbuckle Abhijeet Deobhakta

Reviewers Editorial Team Leader


Róman Joost Aanchal Kumar
Andrew Nicholson
Herjend Teny Project Team Leader
Lata Basantani

Acquisition Editor
Douglas Paterson Project Coordinator
Srimoyee Ghoshal

Development Editor
Ved Prakash Jha Graphics
Geetanjali Sawant

Technical Editors
Aditya Belpathak Production Coordinator
Shantanu Zagade
Charumathi Sankaran

Cover Work
Indexer
Shantanu Zagade
Monica Ajmera Mehta

Proofreader
Lesley Harrison
About the Author

Daniel Arbuckle received his Ph. D. in computer science from the University of Southern
California in 2007. He is an active member of the Python community and an avid unit tester.

I would like to thank Grig, Titus, and my family for their companionship and
encouragement along the way.
About the Reviewers

Róman Joost is a professional Python software developer and a free software enthusiast,
currently living in Australia. Since 2003, he has been contributing to the GNU Image
Manipulation Program (GIMP) by writing documentation and contributing to the source
code. He uses testing frameworks and test-driven methodologies extensively, when writing
new components for the Z Object Publishing Environment (Zope) in Python.

Andrew Nicholson is a software engineer with over 12 years of professional commercial


experience in a broad range of technologies. He is passionate about free and open source
software (FOSS) and has actively participated in contributing code, ideas, and passion in the
open source community since 1999.

Nicholson's biography can be read at http://infiniterecursion.com.au/people/.

Herjend Teny is an electrical engineering graduate from Melbourne who has come to love
programming in Python after years of programming in mainline programming languages,
such as C, Java, and Pascal.

He is currently involved in designing web application using Django for an Article Repository
project on http://www.havingfunwithlinux.com/. The project would allow users to
post their article for public view and bookmark it onto their favorite blog.
Table of Contents
Preface 1
Chapter 1: Testing for Fun and Profit 7
How can testing help? 8
Types of testing 9
Unit testing 9
Integration testing 9
System testing 9
You've got Python, right? 10
Summary 10
Chapter 2: Doctest: The Easiest Testing Tool 11
Basic doctest 11
Time for action – creating and running your first doctest 12
The syntax of doctests 13
Time for action – writing a more complex test 14
Expecting exceptions 15
Time for action – expecting an exception 16
Expecting blank lines in the output 17
Using directives to control doctest 17
Ignoring part of the result 17
Time for action – using ellipsis in tests 17
Ignoring whitespace 18
Time for action – normalizing whitespace 19
Skipping an example entirely 19
Time for action – skipping tests 20
Other doctest directives 21
Execution scope 21
Embedding doctests in Python docstrings 24
Time for action – embedding a doctest in a docstring 24
Doctest directives 25
Table of Contents

Execution scope 26
Putting it in practice: an AVL tree 26
English specification 27
Node data 28
Constructor 30
Recalculate height 30
Make deletable 32
Rotation 33
Locating a node 34
Testing the rest of the specification 34
Summary 35
Chapter 3: Unit Testing with Doctest 37
What is Unit testing and what it is not? 37
Time for action – identifying units 38
Unit testing throughout the development process 40
Design phase 41
Time for action – unit testing during design 41
Development phase 44
Time for action – unit testing during development 44
Feedback phase 47
Time for action – unit testing during feedback 47
Back to the development phase 51
Time for action – unit testing during development... again 51
Maintenance phase 53
Time for action – unit testing during maintenance 53
Reuse phase 55
Time for action – unit testing during reuse 55
Summary 59
Chapter 4: Breaking Tight Coupling by using Mock Objects 61
Installing Python Mocker 61
Time for action – installing Python Mocker 62
The idea of a mock object 62
Python Mocker 63
Time for action – exploring the basics of Mocker 63
Mocking functions 67
Mocking containers 68
Parameter matching 69
ANY 69
ARGS 70
KWARGS 70
IS 71

[ ii ]
Table of Contents

IN 71
CONTAINS 72
MATCH 72
Mocking complex expressions 73
Returning iterators 73
Raising exceptions 74
Calling functions via a mock 74
Specifying that an expectation should occur multiple times 75
Replacing library objects with mocks 77
Mocking self 80
Time for action – passing a mock object as self 80
Summary 82
Chapter 5: When Doctest isn't Enough: Unittest to the Rescue 83
Basic unittest 83
Time for action – testing PID with unittest 84
Assertions 89
assertTrue 89
assertFalse 90
assertEqual 90
assertNotEqual 90
assertAlmostEqual 90
assertNotAlmostEqual 92
assertRaises 92
fail 93
Test fixtures 94
Time for action – testing database-backed units 95
Integrating with Python Mocker 100
Summary 100
Chapter 6: Running Your Tests: Follow Your Nose 101
What is Nose? 101
Installing Nose 102
Organizing tests 103
Time for action – organizing tests from previous chapters 104
Finding doctests 108
Customizing Nose's search 109
Nose and doctest 110
Time for action – creating a fixture for a doctest 111
Nose and unittest 112
Time for action – creating a module fixture 113
Time for action – creating a package fixture 114
Nose's own testing framework 116

[ iii ]
Table of Contents

Time for action – using Nose-specific tests 116


Summary 118
Chapter 7: Developing a Test-Driven Project 119
Writing the specification 119
Time for action – what are you going to do? 125
Writing initial unit tests 125
Time for action – nailing down the specification with unit tests 139
Coding planner.data 139
Using the tests to get the code right 143
Fixing the code 143
Time for action – writing and debugging code 146
Writing persistence tests 147
Writing persistence code 148
Finishing up 151
Summary 153
Chapter 8: Testing Web Application Frontends using Twill 155
Installing Twill 155
Exploring the Twill language 156
Time for action – browsing the web with Twill 156
Time for action – Twill scripting 159
Twill commands 160
help 160
setglobal 160
setlocal 161
add_auth 161
add_extra_header 161
clear_extra_headers 162
show_extra_headers 162
agent 162
back 162
clear_cookies 162
code 162
config 163
debug 163
echo 163
exit 163
extend_with 164
find 164
notfind 164
follow 164
formaction 164
formclear 165
formfile 165

[ iv ]
Table of Contents

formvalue 165
getinput 165
getpassword 165
go 166
info 166
save_cookies 166
load_cookies 166
show_cookies 166
redirect_error 166
redirect_output 166
reset_error 166
reset_output 167
reload 167
reset_browser 167
run 167
runfile 167
save_html 167
show 167
showforms 167
showhistory 168
showlinks 168
sleep 168
submit 168
tidy_ok 168
title 168
url 168
Calling Twill scripts from tests 169
Time for action – running Twill script files 169
Time for action – running Twill script strings 170
A nifty trick 171
Integrating Twill operations into unittest tests 172
Time for action – using Twill's browser object 172
Browser methods 173
get_code 174
get_html 174
get_title 174
get_url 174
find_link 174
follow_link 175
get_all_forms 175
get_form 175
get_form_field 175
clicked 176
submit 176
Summary 176

[]
Table of Contents

Chapter 9: Integration Testing and System Testing 177


Integration tests and system tests 177
Time for action – figuring out the order of integration 178
Automation with doctest, unittest, and Nose 180
Time for action – writing integration tests for the time planner 181
Summary 202
Chapter 10: Other Testing Tools and Techniques 203
Code coverage 203
coverage.py 204
Time for action – using coverage.py 205
Version control hooks 207
Bazaar 208
Time for action – installing Nose as a Bazaar post-commit hook 208
Mercurial 210
Time for action – installing Nose as a Mercurial 210
post-commit hook 210
Git 211
Time for action – installing Nose as a Git post-commit hook 212
Darcs 213
Time for action – installing Nose as a Darcs post-record hook 213
Subversion 215
Time for action – installing Nose as a Subversion 216
post-commit hook 216
Automated continuous integration 219
Buildbot 219
Time for action – using Buildbot with Bazaar 219
Summary 223
Appendix: Answers to Pop Quizes 225
Chapter 2 225
Pop quiz – doctest syntax 225
Chapter 3 225
Pop quiz – understanding units 225
Pop quiz – unit testing during design 226
Pop quiz – unit testing 226
Chapter 4 226
Pop quiz – Mocker usage 226
Chapter 5 227
Pop quiz – basic unittest knowledge 227
Pop quiz – text fixtures 227
Chapter 6 227

[ vi ]
Table of Contents

Pop quiz – testing with Nose 227


Chapter 7 227
Pop quiz – test-driven development 227
Chapter 8 228
Pop quiz – the Twill language 228
Pop quiz – browser methods 228
Chapter 9 228
Pop quiz – diagramming integration 228
Pop quiz – writing integration tests 229
Chapter 10 229
Pop quiz – code coverage 229
Pop quiz – version control hooks 229
Index 231

[ vii ]
Other documents randomly have
different content
The Project Gutenberg eBook of Sewage and
Garbage Disposal on the Farm
This ebook is for the use of anyone anywhere in the United States and most
other parts of the world at no cost and with almost no restrictions
whatsoever. You may copy it, give it away or re-use it under the terms of the
Project Gutenberg License included with this ebook or online at
www.gutenberg.org. If you are not located in the United States, you will have
to check the laws of the country where you are located before using this
eBook.

Title: Sewage and Garbage Disposal on the Farm

Author: J. W. Rockey
Joseph Winslow Simons

Release date: July 10, 2020 [eBook #62605]

Language: English

Credits: Produced by Tom Cosmas

*** START OF THE PROJECT GUTENBERG EBOOK SEWAGE AND GARBAGE


DISPOSAL ON THE FARM ***
SEWAGE and
GARBAGE
DISPOSAL
on the
FARM

FARMERS' BULLETIN No. 1950


U.S. DEPARTMENT OF AGRICULTURE

T HIS Bulletin is a guide to up to-date methods


for the sanitary disposal of sewage and other
household and farm wastes. It tells how to
construct satisfactory sanitary facilities and how to
maintain them and gives special attention to the
questions on sanitation asked most frequently by
farm people.
Solutions to all problems cannot be given here,
and often advice must be sought from local
sanitary officials. Many county and State health
departments furnish advice and copies of local
regulations and sometimes provide inspection
service. Where there are no specific local
requirements, this bulletin may be accepted as a
guide to safe practice.

Issued March 1944


Washington, D. C. Revised June 1946

SEWAGE AND GARBAGE


DISPOSAL
ON THE FARM
By J. W. Rockey, assistant agricultural engineer,[1] and J. W. Simons,
associate agricultural engineer, Division of Farm Buildings and Rural Housing,
Bureau of Plant Industry, Soils, and Agricultural Engineering, Agricultural
Research Administration
[1] The senior author prepared the preliminary draft, and the junior
author completed the bulletin.
Contents
Page
Characteristics of sewage 1
Protection of water sources from household wastes 2
Septic-tank systems 2
Operation of a septic tank system 2
Selecting the site 4
The house sewer 4
The septic tank 8
Building a concrete tank 11
The effluent sewer 13
The disposal field 13
Disposal methods in tight or wet soils 14
Care and maintenance of septic tanks 17
Effect of drain solvents and other materials 17
Protection against freezing 17
Septic-tank troubles 18
Grease traps 18
Disposal of drainage from fixtures other than toilets 19
Cesspools 20
Privies 21
Care, and maintenance 22
Chemical closets 24
Disposal of garbage and trash 25

TO INSURE healthful living, domestic wastes must be disposed of.


Primitive wanderers and too often present-day tourists deposit their wastes
promiscuously and move on when the surroundings become foul. This is
impractical in built-up communities. Therefore, in most cities and in some
rural areas sanitary codes regulate the disposal of wastes.
CHARACTERISTICS OF SEWAGE
Household sewage ordinarily consists principally of human excrement,
toilet paper, garbage, dish water, and other wash water from the various
plumbing fixtures and floor drains.
Many kinds of bacteria, at times disease-producing ones, are contained in
the discharges from the human body. Epidemics of typhoid fever, dysentery,
diarrhea, cholera, and other water-borne diseases may result from the
pollution of the water supply with sewage. Pollution is carried by water
moving underground, as well as by water flowing on the surface. This is
especially true in limestone regions, where underground channels and rock
crevices permit water to flow for considerable distances with little filtering
action. Sewage used for fertilizing or irrigating crops[2] may contaminate
vegetables or the udders of cows and thus spread disease. Anthrax, cholera,
and parasitic worms may be present in the surface drainage from fields and
barn lots. It is wise to regard all sewage as dangerous and to dispose of it
promptly in a sanitary manner, so that disease germs will not pollute the
water supplies or be spread by flies, animals, or man.
[2] This subject is discussed at length in Technical Bulletin 675, Sewage
Irrigation as Practiced in the Western States.
PROTECTION OF WATER SOURCES FROM
HOUSEHOLD WASTES
Under most farm conditions a safe place for the disposal of wastes is in
the upper 3-foot layer of soil, where the action of bacteria tends to render it
harmless. Tile disposal fields, such as are used with septic tanks, and earth-
pit privies accomplish this if the water table remains several feet below the
surface and if the location is remote from water supplies. Cesspools and other
types of pits do not ordinarily confine contamination to their immediate
vicinity and are not recommended except for special conditions.
Sewage or other wastes discharged into abandoned wells or other pits
that reach to the water table or below it are almost certain to contaminate
the ground water.
It is generally poor practice, and often illegal, to discharge wastes into
surface streams. Streams do not necessarily purify themselves in 50 feet, 100
feet, or some other stated distance, as is commonly believed. They do tend to
purify themselves over long distances through the action of sunlight, aeration,
and other factors but may not be safe for domestic use for many miles below
the source of pollution. Clear, sparkling water is not always safe drinking
water. Streams in agricultural communities are subject to many sources of
pollution and they are likely to become more contaminated as they merge
into larger streams.
SEPTIC-TANK SYSTEMS
Septic-tank systems, if installed and maintained properly, provide the most
sanitary method of sewage disposal for farmhouses equipped with running
water.
Ground water or rock close to the surface, lack of sufficient fall for the
sewage to flow by gravity, and too small an absorption area for the effluent
limit the satisfactory operation of a septic tank. When these conditions exist,
special advice should be sought from a competent local sanitary authority.
Adverse soil conditions can be overcome if sufficient fall and space are
available.
The five essential parts (fig. 1) of a septic-tank system are (1) the house
sewer; (2) the septic tank; (3) the effluent sewer; (4) the distribution box;
and (5) the disposal field. In special cases a grease trap (see fig. 11, p. 19) is
added. To facilitate inspection and repairs it is good practice to keep in the
house a chart showing the location of the tank and other parts of the system.
A septic tank does not necessarily purify the sewage, eliminate odor, or
destroy all solid matter. Its purpose is to condition the sewage or domestic
waste by bacterial action, so that it can be disposed of in a more satisfactory
manner.
Figure 1.—A septic-tank system.

OPERATION OF A SEPTIC-TANK SYSTEM


In a septic-tank system the sewage flows by gravity from the farmhouse
through the sewer into the tank, where it should remain at least 24 hours.
While passing through the tank the solids are acted upon by anaerobic
bacteria, which work only in the dark and where there is little air. The heavy
particles settle to the bottom as sludge, the lighter particles float as scum,
and the remainder passes out of the tank through the effluent sewer to the
disposal field. The gas released in the process escapes through a vent
provided either in the T to the house sewer or the effluent sewer.
A tank that is too small may fill up with solids in a short while, because
sufficient time is not allowed for breaking them down by fermentation, or the
sewage may be pushed right through into the disposal field and clog it.
The effluent may contain even more disease germs than the original
sewage, and though it may be as clear as spring water it is far from pure and
may cause foul odors if discharged or allowed to pool on the surface of the
ground.
The final disposition of the effluent into the upper layer of the soil exposes
it to the action of aerobic bacteria. These bacteria, unlike those in the tank,
need air and cannot work in saturated soil or live much more than 3 feet
below the surface of the ground. The "living earth," or upper stratum, teems
with these bacteria, which convert the dangerous sewage and disease germs
into harmless matter and thus tend to purify the effluent if it remains long
enough in the top layers of soil before seeping into the subsoil and thence to
the ground water. Effluent discharged deep in the soil does not receive the
benefit of this purifying action.
Several types of septic tanks are in common use. The one described in this
bulletin is the single-chamber type, which can be built with or without siphon.
This should meet all average farm needs where there are not more than 16
members in the household. It would be advisable to consult the authorities of
the State agricultural college or local health department as to their
recommendations because frequently local conditions and larger
establishments require special installations.

SELECTING THE SITE


First install the tile disposal field where there will be least danger of
polluting water supplies, at least 100 feet from water sources if possible and
always at a lower surface elevation. This is of greatest importance. Even
though selecting a more distant location would result in greater initial cost, it
would be a good investment as protection against diseases that might result
from pollution of water sources. The site should slope away from the house
and away from the source of water. Gentle unshaded slopes free of trees or
shrubbery are best. Root-free locations are important because the open-
jointed tile cannot be "rootproofed." Porous, well-drained, gravelly, or sandy
soil allows greater purification. Do not have the disposal field in vegetable
gardens, under roadways, in swampy land, in muck soils, or in areas having
rock substrata sloping toward the water supply. Allow sufficient area, where
available, to enlarge the field later if needed.
The septic tank may be close to the house, but a more distant site would
reduce the likelihood of odors if leakage occurs. The tank should also be kept
50 feet or more from any source of water supply and at a lower elevation. It
should not be placed under driveways, pavements, or flower beds, as these
would make it not readily accessible for periodic inspection. Care should be
taken to insure that surface drainage from the area around the tank will not
reach the vicinity of the water supply.

THE HOUSE SEWER


Material
Vitrified salt-glazed clay or well-made concrete sewer pipe and cast-iron
soil pipe are the standard materials for house sewers on farms. Asphalt-
impregnated fiber pipe, of a type designed especially for house sewers,
appears to be satisfactory for this purpose. Cast-iron soil pipe with leaded
joints should be used when the sewer is within 50 feet of a well or suction
line from a well, within 10 feet of any drinking-water supply line under
pressure, within 5 feet of basement foundations, or when laid beneath
driveways with less than 3 feet of earth covering the pipes. When within 15
feet of large trees or shrubs, the sewers should have root-tight joints.

Size
For house sewers, 4- and 6-inch pipes are generally used. Where a 4-inch
pipe is used, cast-iron is commonly recommended. Grades with little fall
require larger pipes. The large sizes are also less liable to become clogged.
Clay pipe is made in pieces 2 or 21/2 feet long, whereas fiber-pipe sections
are 4 feet long and cast-iron pipe 5 feet long, so that there are fewer joints.
The minimum number of joints is desirable, as there is less danger of
stoppage.

Alinement
Run the house sewer in a straight line and avoid bends whenever possible.
Slight changes in direction may be made with one-sixteenth or one-eighth
bend fittings. For sharper changes of direction a manhole or distribution box
may be used. Changes in direction of more than 45 are not recommended
unless a manhole is provided. Clean-outs are desirable within 5 feet of the
septic tank where tanks are placed more than 20 feet from the building and
the sewer line is not buried deeper than 4 feet.

Establishing Line and Grade


The trench for laying the sewer is usually dug after the septic-tank
excavation has been completed and the elevation of the tank inlet
determined. A simple method of setting guides for the excavation is illustrated
in figure 2.

Digging the Trench


Start digging the trench at the tank end, so that rain or seepage will have
an outlet. Rounding the bottom of the trench to the shape of the pipe and
hollowing out basins for the "bell" ends allows the pipe to rest firmly
throughout its full length, permits full calking of joints, and relieves the strain
on them.

Laying the Pipe


Begin laying the pipe at the tank with the bell end uphill. Joints in clay-tile
pipe are commonly made with portland cement mortar or grout. Where root-
proof joints are essential, sulfur-sand compounds may be used or copper
rings provided and used with cement-mortar joints. Asphalt-mastic
compounds, however, are more satisfactory. For cast-iron soil pipe, lead is the
standard joint material.
After the hub is pushed into the bell, oakum (or old hemp rope) is packed
with a calking iron or a piece of wood (fig. 3, A.) solidly and evenly in the
joint to a depth of about half an inch to center the hub end in the bell and to
keep the joint filler from getting inside the pipe. Oil, grease, or dirt on the
joint surfaces should be removed, as it will prevent joint material from
sticking. Figure 3 shows the different jointing methods.
Figure 2.—Establishing grade for sewer. A, 2- by
4-inch stakes are set each side of the trench
at convenient distances a, b, c, and d. Then
a board is nailed horizontally on the stakes
at d at a convenient height above the
bottom of the trench, that is, the bottom of
the sewer leaving the house. A board is
nailed likewise to the stakes at a the same
height above the inlet to the tank that d is
above the bottom of the trench. Similarly,
boards are set at b and c by sighting from a
to d so the tops of the intermediate boards
will be in line. B, The exact grade of the
sewer is obtained by measuring from the
grade cord with the 1- by 1-inch stick,
shown in detail. The length of the stick must
equal the height of the board above sewer
at d.

Bituminous, sulfur-sand, lead, and other commercial joint compounds are


poured while hot into the joint from a ladle (fig. 3, F), and when the work is
well done they form a joint that is practically root-proof. They are more
expensive than cement mortar.
For molding hot compounds, a clay dike, or funnel, built about 3 inches
high around the triangular opening at the top of the jointer greatly aids in the
rapid and complete filling of the joint space. A hot joint must be poured
continuously, otherwise a seam may develop between successive pourings.
Bituminous compounds make a slightly elastic joint. A joint in 4-inch pipe
requires about 3/8 to 1/2 pound of compound and in 6-inch pipe about 1 to
11/2 pounds.

Sulfur-sand joints are hard and inelastic. The compound is made by mixing
together equal volumes of ordinary powdered sulfur and very fine clean sand,
preferably the finest quicksand, and then heating the mixture until the sulfur
melts. A 4-inch joint takes about 3/4 pound and a 6-inch joint about 17/8
pounds of the mixture. Commercial sulfur-joint compounds also are available.
Figure 3.—Jointing sewer pipe. A, Using calking iron to force
packing into joint. B, Making joint with 1:2 portland
cement mortar. Use only enough water to dampen the
mix. Recalk after half an hour, to close shrinkage cracks.
C, The completed joint. Wrap finished joint with cloth and
keep dampened, to aid curing. D, Joint made by pouring
1:1 Portland cement grout of creamy consistency into a
form. This type of joint is not feasible unless the metal
forms shown are available. E, Use of asbestos runner
clamped around pipe, for pouring hot joint. F, Clay roll
used in place of asbestos runner. G, A completed
bituminous joint. H, Use of swab, to remove any joint
material forced through to inside of pipe.
Soft pig lead or old scrap lead is suitable for lead joints on cast-iron pipe.
About 3/4 pound per inch of pipe diameter is generally required for each joint.
The lead is hot enough to pour when it begins to char the paddle used to
skim off the impurities. When it cools it must be calked tightly to take up
shrinkage. The calking should be uniform around the entire joint and should
stop when the lead is tight. Heavy pounding or continued calking may crack
the bell of the pipe.
It is easier to get good, joints when the pipe is in a vertical position.
Therefore, two lengths of pipe are frequently joined and are then laid as a
single unit in the trench. In using terra cotta pipe, this procedure may be
followed only when the joint is made with a mastic compound. Cement-
mortar joints cannot be used in such cases.
Before filling the trench, the sewer should be tested to detect possible
leaks. Earth free from rubbish and large stones should then be tamped
around and about 1 foot above the pipe.

THE SEPTIC TANK


Flow Through the Tank
Slow, undisturbed flow through the tank is necessary for the separation of
solids and liquids and for bacterial action. Submerged inlets and outlets or
baffle boards reduce disturbance. A submerged outlet prevents scum from
passing out with the effluent.
The single-chamber tank without a siphon, shown in figure 4, is easy to
build, inexpensive, and entirely satisfactory in most instances. In very tight
soils or for large installations a siphon and sometimes two chambers are
advisable.

Size
The tank should be large enough to retain the sewage at least 24 hours.
The size should be determined by the largest number of persons that may live
in the house, rather than by the number actually living there at the time the
tank is built. The additional cost of a large tank over a small one is relatively
little. If there is any question as to which of two sizes should be built, it is
wise to choose the larger. The dimensions recommended in the table in figure
4 are based on an average production of 50 gallons of sewage per person per
day.
Unusually large quantities of sewage call for a tank of large capacity. In
village and suburban homes where there is less food preparation than on
farms and where the number of persons is more or less fixed, slightly smaller
sizes will serve. In no case should the capacity of the tank below the flow line
be less than 500 gallons. A tank length of two to three times the width should
be maintained, and it is advisable to provide a depth of at least 4 feet below
the flow line.
Allow about 1 foot of "freeboard," or air space, above the flow line for the
accumulation of gases. This space is generally vented through the soil stack
of the house.
A siphon (fig. 5) with a dosing chamber is not considered necessary for a
farm septic tank except for large installations (1,000 gallons or more), for
those in tight soils, and where the disposal field is limited.
CAPACITIES, DIMENSIONS, AND CONCRETE MATERIALS
FOR SEPTIC TANKS SERVING INDIVIDUAL DWELLINGS
Materials for
Maximum Liquid Recommended inside
concrete 1:21/2:4
number capacity dimensions
mix
of of tank
persons in Sand Gravel
Liquid Total Cement
served gallons Width Length cubic cubic
depth depth sacks
yards yards
4 or less 500 3'-0" 6'-0" 4'-0" 5'-0" 16 1 1/ 2 21 / 2
6 600 3'-0" 7'-0" 4'-0" 5'-0" 17 1 3 / 4 23 / 4
8 750 3'-6" 7'-6" 4'-0" 5'-0" 19 2 3
10 900 3'-6" 8'-6" 4'-0" 5'-0" 21 21 / 4 31 / 4

12 1100 4'-0" 5'-6" 4'-6" 5'-6" 24 21 / 4 31 / 2

14 1200 4'-0" 5'-0" 4'-6" 5'-6" 25 21 /


2
3
3 /4
3
2 /4 41 / 4
16 1500 4'-6" 10'-0" 4'-6" 5'-6" 28
Figure 4.—Single-chamber septic tank. Note
alternate use of baffle boards where sanitary
tees are omitted at inlet and outlet.
The siphon provides intermittent discharge of effluent, which allows time
for the disposal area to rest and aerate between discharges. This is more
important where the discharge is nearly continuous than in small installations.
The frequency and volume of the discharge into the tile field are controlled
by the sizes of the siphon and the dosage chamber. The dealer should be
informed of the size of the tank and the number of persons in the household,
in order that he may furnish the proper unit. A 3- or 4-inch siphon will be
adequate for almost any farmhouse installation.

Construction
Most septic tanks are built of concrete cast in place, since in this way
there is a minimum possibility of cracks developing. Concrete blocks, however
(not cinder blocks), stone, brick, or structural tile are sometimes used.
Prefabricated commercial tanks of concrete and various other materials also
are available.
SIPHON
Diameter of siphon A - 3" or 4" Clearance under bell E - 2"
Distance across U-
Diameter of bell B - 10"or 12" F - 10" or 12"
trap
Bottom of outlet to C - 201/2" to Bottom of outlet to
G - 12" or 13"
discharge line 253/4" bottom of U-trap>
H - 71/4"to
Drawing depth D - 13" to 17" Height above floor
113/4"
DIMENSIONS OF DOSING CHAMBER
Number of Depth below
Width[4] Length
persons served discharge line[3]
4 or less 161/4" to 201/4" 3'-0" 6'-0"
6 " 3'-0" 7'-0"
8 " 3'-6" 7'-6"
10 " 3'-6" 8'-6"
12 " 4'-0" 8'-6"
14 " 4'-0" 9'-0"
16 " 4'-6" 10'-0"

[3] Depending upon depth C of siphon.


[4] Same as single chamber tank fig. 4.

Figure 5.—Typical design for a concrete septic tank with a dosing


chamber and a siphon.

Masonry units should be laid in full beds of 1:3 cement mortar and the
walls and floor plastered with at least a 1/2-inch coat of 1:2 mortar. Cells of
concrete blocks and tile must be filled with concrete. Masonry walls are
generally 8 inches thick, and care must be taken to follow inside dimensions
given for concrete tanks. Directions for laying structural tile, brick, and
concrete blocks can be obtained from dealers or trade associations.
Commercial tanks are suitable if they embody the essential features given
in this bulletin. Capacities should be as recommended in figure 4 for concrete
tanks. Proper installation and periodic servicing also are essential. Tanks badly
damaged in handling should not be used. Rapid corrosion of steel tanks will
result if the asphalt coating is impaired. Minor defects in precast masonry
tanks may often be overcome by plastering the interior with cement mortar.

BUILDING A CONCRETE TANK[5]


[5] For information on making and placing concrete, see Farmers'
Bulletin 1772, Use of Concrete on the Farm.

A convenient method of assuring correct location of the tank is to build a


frame as shown in figure 6. Care is necessary to aline it with the center line of
the inlet and outlet and to level it so that the distance from the bottom of the
2 by 4's on the form to the lower edge of the inlet hole in the form will permit
it to be set at the grade of the house sewer. This frame is used to support the
form for the tank. To avoid caving the edges, drive the stakes supporting the
frame before beginning the excavation. The lumber in the frame can be used
later to make part of the tank baffles.
Figure 6.—Method of outlining a septic-tank
excavation on the ground surface.
Figure 7 shows how an inside form can be built and hung in place. The
inlet and outlet tees should be carefully set and tied in place before the
concrete is poured. A single length of pipe should be joined to the tee, so that
the two can be set in the form as one unit. In most cases the earth walls of
the excavations will serve as the outside forms unless the soil is sandy or
gravelly and the excavation is deeper than 5 feet. If outside forms are used,
space must also be provided for them. Forms should be constructed before
the excavation is made and the tank built as soon as practical, to avoid
warping of forms and caving of earth walls.

Figure 7.—Inside form hung in place for single-


chamber septic tank, also a form for casting
concrete-slab cover in sections.
County agricultural agents, local health departments, building-material
dealers, and other agencies often have forms that may be borrowed or
rented.

THE EFFLUENT SEWER


The effluent sewer should be constructed in similar manner and of the
same materials as the house sewer and on a slope of 1/8 inch to 1 foot. This
line, however, may be laid of terra-cotta pipe, as cast-iron is not considered
necessary except in unusual cases. This line should always terminate in a
distribution box from which the tile lines of the disposal field lead away. For
steep slopes the arrangement shown in figure 9 (p. 15) is practical. Joints
must be of root-tight construction if the sewer is in the vicinity of trees or
shrubs. The length of the sewer depends upon the distance from the tank to
a safe site for the disposal field.

THE DISPOSAL FIELD


Correct installation of the disposal field is of great importance for proper
functioning of the septic tank. Therefore, the width, depth, and spacing of the
tile trenches must be carefully selected. Line of 4-inch, open- jointed,
agricultural drain tile laid in shallow trenches are ordinarily used. Perforated
fiber drain pipes also may be used and are obtainable in 4-foot lengths.
A distribution box with an inlet for the effluent sewer and an outlet for
each individual run of disposal tile is the best means of dividing the flow. The
outlet serving a large or double disposal field may be alternately opened and
closed by means of a sewage switch that permits half the disposal field to
work and rest alternately several weeks. A switch is especially helpful in tight
soils but should not be provided unless proper maintenance is assured, so
that a portion of the disposal field will not be left to handle the entire load of
the system for an indefinite period. There are many variations of boxes, but
figure 8 shows a practical type.
Figure 8.—Typical distribution
box.

Shallow Tile Lines


The disposal tile should not be more than 18 to 24 inches below the
surface, and where the ground-water level rises to the bottom of the trench
special underdrains, described on page 16, are necessary. Special provisions
must also be made where tight soils are encountered. These methods are
described in the section entitled "Disposal methods in tight or wet soils."
The table in figure 9, together with the information given in table 1,
below, may be used for estimating the number of tiles needed in any
particular soil type. If there is any doubt about this requirement, a percolation
test should be made in the disposal field, as follows:
Dig a hole 1-foot square and to the depth at which the tile is to be laid.
This depth in most instances will be about 24 inches and should not exceed
36 inches. Fill the hole with water to a depth of 6 inches and observe the time
required for the water to seep away; divide by 6 to get the average time for
the water to fall 1 inch. The test should be repeated at three or four different
points in the disposal field and the average time noted for all tests used. The
data in table 1 can then be used to determine the number of tiles needed.
Where 1 hour is required for the water to fall 1 inch the soil is totally
unsuitable, and another site should be selected. Soil conditions at the time of
the test may vary from year-round average conditions, and this factor must
be taken into account. If the soil appears exceptionally dry, greater depths of
water may be used or the test repeated in the same hole. In no case should
tests be made in filled or frozen ground. Where fissured rock formations are
encountered, advice should be sought from sanitation specialists.

Table 1.—Determining tile-disposal field requirements from percolation tests[6]

Minutes Effective absorption Minutes Effective absorption


required for area required, per required for area required, per
water to fall 1 person, in bottom of water to fall 1 person, in bottom of
inch disposal trenches inch disposal trenches
Square feet Square feet

2 or less 26 10 52
3 30 15 63
4 36 30 90
5 40 60[7] 120

[6] A minimum of 150 square feet should be provided, equal to 100


feet of 18-inch trench.
[7] If more than 60 minutes, use special design with seepage pits or
sand-filter trenches.

Figure 9 suggests methods of arranging the tiles in disposal fields under


varying conditions and the length of tiles needed.

DISPOSAL-TILE TRENCH
Disposal-tile lines—Maximum length for
each line 100 feet. All lines to be equal in
length.
Disposal-tile lines to slope 2" to 4" per 100
feet, not over 6". Sewer-tile lines to slope
1/ " to 1/ " per foot.
8 4
SIZE AND MINIMUM SPACING
REQUIREMENTS
FOR DISPOSAL TRENCHES
EFFECTIVE
TRENCH TRENCH ABSORPTION TILE
WIDTH- DEPTH-D AREA IN LINES
W IN IN SQUARE FEET SPACING-
INCHES INCHES PER LINEAL S IN FEET
FOOT
18 to
18 1.5 6.0
30
18 to
24 2.0 6.0
30
18 to
30 2.5 7.5
36
24 to
36 3.0 9.0
36
Wider spacing of the lines desirable
where
available area permits
Figure 9.—Arrangements for tile-disposal fields, method of laying tile, and
length of tiles needed.

DISPOSAL METHODS IN TIGHT OR WET SOILS


If the soil is heavy clay or has tight formation, yet shows some porosity
from percolation tests, the efficiency of the field may be increased by placing
below the tile lines 12 to 15 inches of additional filter material (washed
gravel, crushed stone, slag, clean cinders, or clean bank-run gravel 3/4 to 21/2
inches in size). When the surface soil is tight and is underlain by porous soil,
sufficient drainage is sometimes obtained for the smaller installations by
omitting the tile field and providing a dry well at the end of the effluent sewer,
provided the water table will not be contaminated. Larger systems under such
soil conditions should have a tile field, and absorption can be increased by
boring 6- or 8-inch holes down to the porous stratum and filling them with
gravel or sand; the holes should be 4 to 6 feet apart. Another and perhaps
the best practice is to excavate the tile trenches 4 to 6 feet and install a lower
tile line, as shown in figure 10. This latter method is especially desirable if the
upper tight stratum is especially thick, or if there is no porous lower stratum,
or if in irrigated regions and where the disposal field is limited in area.
Where the underdrain tile is not used, the absorption capacity of the field
can be increased by providing a rock-filled trench across the lower end of the
tiles for the full width of the field. The depth should be not less than 5 feet
and the width not less than 3 feet.
On account of the beneficial action of bacteria in the upper soil layers it is
highly desirable to confine the effluent near the surface rather than to use
underdrains. Purification becomes slower and less effective, the deeper the
drains.
In situations where the soil contains considerable moisture or is even
saturated, the field may be improved by partially encircling it with a tile line
laid to serve as a drain. Such a line should be on the high side and have
surface outlets for removing the water from the soil. It should not be laid so
close to a disposal tile line that it will drain the sewage effluent from the
disposal field onto the surface of the ground.

Slope of disposal tile 2 to 4 inches per 100 feet.


Slope of underdrain tile not less than above.
Plug upper end of underdrain tile lines, lower
end
to discharge into rock-filled seepage pit or into
other approved outlet.
Figure 10.—Filter trench with
underdrains.
When the tile field is underlain by stratified rock or where under-drainage
is necessary, advice should be sought from the public health authorities, as
regulations in some States may not permit the use of certain methods.

CARE AND MAINTENANCE OF SEPTIC TANKS


A septic tank when first used does not need starters, such as yeast, to
promote bacterial action. A good septic tank normally requires no
maintenance other than a yearly inspection and an occasional cleaning.
Frequency of cleaning depends on the capacity of the tank and the quantity
and composition of the sewage. Tanks of the size recommended in this
bulletin may require cleaning at intervals of 3 to 5 years.
The tank should be cleaned when 18 to 20 inches of sludge and scum has
accumulated. If a drain has not been provided, sludge may be removed by
bailing or by pumping with a sludge or bilge pump. It is not necessary to
remove the entire liquid contents. Burial in a shallow pit or trench with at
least 18 to 24 inches of earth cover at a point remote from water sources is
the most practical method for disposing of these wastes.
A septic tank is intended to handle sewage only. Coffee grounds and
ground garbage may be included if there is an ample supply of water for
flushing and the tank is cleaned more frequently than would otherwise be
done. The size of the tank should be increased at least 25 percent if these
materials are included in the sewage.
Do not use matches or an open flame to inspect a septic tank,
as the gasses produced by decomposing sewage may explode
and cause serious injury.

EFFECT OF DRAIN SOLVENTS AND OTHER


MATERIALS
Soap, drain solvents, and other mild cleaning or disinfecting solutions used
for normal household purposes cause no trouble in the tank. Constant use in
large quantities, however, and disinfected wastes from the sickroom may
prove harmful.
Wastes from milk rooms, strong chemicals used in sterilizing equipment or
in photographic work, and the wastes from filters or water softeners not only
reduce bacterial action but also cause abnormally rapid accumulations of
sludge and clogging of the tile lines.

PROTECTION AGAINST FREEZING


Septic-tank systems seldom freeze when in constant use. Warm water and
the decomposition of the sewage usually maintain above-freezing
temperatures. In cold regions there is trouble from freezing if various parts of
the system are not covered adequately. If the system is to be out of service
for a period of time or if exposure is severe, it may be advisable to mound
over the poorly protected parts of the system with earth, hay, straw, brush,
leaves, manure, snow, or the like.
In cold regions it is not advisable to install the entire system below frost
depth, as this will remove the effluent from the action of the aerobic bacteria
in the upper layers of the soil and make the system generally less accessible.
New systems put into operation during very cold weather may freeze
unless large quantities of hot water are discharged during the first few weeks.

SEPTIC-TANK TROUBLES
In sewage disposal, clogging of the disposal field is the most common
trouble. This may be caused (1) by a tank too small for the volume of
sewage, (2) by failure to clean the tank regularly, (3) by interior arrangement
that does not provide slow flow through the tank or that allows scum or
sludge to pass out with the effluent, or (4) by a disposal field that is too small
or is incorrectly built.
The remedy for a clogged disposal field is to dig up and clean the tiles and
re-lay them 3 or 4 feet to one side or the other of their former position.
Sometimes a tile line can be cleaned by opening up the line at each end and
flushing it thoroughly with a hose. With this method provision must be made
to drain off and safely dispose of the water used for flushing.
Tile lines laid with improper slope allow the effluent to collect in a limited
area and saturate the soil, causing odors. Bacteria cannot work in such areas,
where the soil becomes sour, or "sewage-sick." These lines must be relaid on
the correct slope. Odors or a water-logged soil may also indicate that the
disposal field is too small.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookname.com

You might also like