forked from chrivers/pyjaco
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Christian Iversen
committed
Jan 16, 2012
1 parent
1cec7a2
commit b15f391
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
print coerce(0, 0) | ||
print coerce(1.0, 0) | ||
print coerce(0, 1.0) | ||
print coerce(1.0, 1.0) | ||
|
||
try: | ||
print coerce("foo", 1.0) | ||
except TypeError, E: | ||
print "Fail", E | ||
|
||
try: | ||
print coerce(2, "foo") | ||
except TypeError, E: | ||
print "Fail", E |