diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-05-29 16:42:39 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-05-29 16:42:39 +0000 |
commit | 3905f9962bbfb312c3804ff9c7b7d1e0fa203cbc (patch) | |
tree | 94ef8fa114a86b61e5182ef051e30476aca020a6 /python/test.py | |
parent | 6b940f4404ef9b357fd725b7aa7fb24c96680abd (diff) | |
download | libgats-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-x | python/test.py | 13 |
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 | ||
3 | import gats | 3 | import gats |
4 | 4 | ||
5 | print gats.load( open('test.gats', 'rb') ) | 5 | print isinstance( True, bool ) |
6 | print isinstance( True, int ) | ||
7 | print isinstance( 1, bool ) | ||
8 | print isinstance( 1, int ) | ||
6 | 9 | ||
7 | gats.dump( 3.14159, open('out.gats', 'wb') ) | 10 | print gats.loads( gats.dumps( 0 ) ) |
8 | |||
9 | print gats.loads( | ||
10 | gats.dumps( | ||
11 | 500.12345 | ||
12 | ) | ||
13 | ) | ||