aboutsummaryrefslogtreecommitdiff
path: root/python/test.py
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-05-29 16:42:39 +0000
committerMike Buland <eichlan@xagasoft.com>2012-05-29 16:42:39 +0000
commit3905f9962bbfb312c3804ff9c7b7d1e0fa203cbc (patch)
tree94ef8fa114a86b61e5182ef051e30476aca020a6 /python/test.py
parent6b940f4404ef9b357fd725b7aa7fb24c96680abd (diff)
downloadlibgats-3905f9962bbfb312c3804ff9c7b7d1e0fa203cbc.tar.gz
libgats-3905f9962bbfb312c3804ff9c7b7d1e0fa203cbc.tar.bz2
libgats-3905f9962bbfb312c3804ff9c7b7d1e0fa203cbc.tar.xz
libgats-3905f9962bbfb312c3804ff9c7b7d1e0fa203cbc.zip
Apparently in python bools are ints, but ints aren't bools...this means that
you have to test for bool before int or bools are converted to ints. This is fixed now, bools transfer correctly.
Diffstat (limited to 'python/test.py')
-rwxr-xr-xpython/test.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/python/test.py b/python/test.py
index f4e679a..fa9c79a 100755
--- a/python/test.py
+++ b/python/test.py
@@ -2,12 +2,9 @@
2 2
3import gats 3import gats
4 4
5print gats.load( open('test.gats', 'rb') ) 5print isinstance( True, bool )
6print isinstance( True, int )
7print isinstance( 1, bool )
8print isinstance( 1, int )
6 9
7gats.dump( 3.14159, open('out.gats', 'wb') ) 10print gats.loads( gats.dumps( 0 ) )
8
9print gats.loads(
10 gats.dumps(
11 500.12345
12 )
13 )