rubyfox-server 2.3.0.pre2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/.rvmrc +1 -0
- data/Gemfile +3 -0
- data/LICENSE.txt +22 -0
- data/README.md +23 -0
- data/Rakefile +1 -0
- data/bin/smartfox +7 -0
- data/lib/rubyfox/server/cli.rb +59 -0
- data/lib/rubyfox/server/data/config/.keep +0 -0
- data/lib/rubyfox/server/data/config/_backups/.keep +0 -0
- data/lib/rubyfox/server/data/config/ascii/boot.txt +5 -0
- data/lib/rubyfox/server/data/config/ascii/ready.txt +9 -0
- data/lib/rubyfox/server/data/config/core.xml +44 -0
- data/lib/rubyfox/server/data/config/crossdomain.xml +10 -0
- data/lib/rubyfox/server/data/config/descriptors/.keep +0 -0
- data/lib/rubyfox/server/data/config/descriptors/config_room.txt +323 -0
- data/lib/rubyfox/server/data/config/descriptors/config_server.txt +621 -0
- data/lib/rubyfox/server/data/config/descriptors/config_zone.txt +1021 -0
- data/lib/rubyfox/server/data/config/descriptors/runtime_game.txt +63 -0
- data/lib/rubyfox/server/data/config/descriptors/runtime_room.txt +377 -0
- data/lib/rubyfox/server/data/config/descriptors/runtime_user.txt +589 -0
- data/lib/rubyfox/server/data/config/descriptors/runtime_zone.txt +354 -0
- data/lib/rubyfox/server/data/config/jetty/.keep +0 -0
- data/lib/rubyfox/server/data/config/jetty/jetty.xml +214 -0
- data/lib/rubyfox/server/data/config/jetty/realm.properties +21 -0
- data/lib/rubyfox/server/data/config/jetty/webdefault.xml +410 -0
- data/lib/rubyfox/server/data/config/log4j.properties +75 -0
- data/lib/rubyfox/server/data/config/myprop.properties +5 -0
- data/lib/rubyfox/server/data/config/server.xml +65 -0
- data/lib/rubyfox/server/data/config/templates/sfs2x.unix.txt +12 -0
- data/lib/rubyfox/server/data/config/templates/sfs2x.windows.txt +1 -0
- data/lib/rubyfox/server/data/config/templates/vmoptions.txt +3 -0
- data/lib/rubyfox/server/data/config/wordsFile.txt +13 -0
- data/lib/rubyfox/server/data/data/bannedusers/.keep +0 -0
- data/lib/rubyfox/server/data/data/bannedusers/users.bin +0 -0
- data/lib/rubyfox/server/data/data/buddylists/.keep +0 -0
- data/lib/rubyfox/server/data/data/buddylists/BasicExamples/7364666773646667 +0 -0
- data/lib/rubyfox/server/data/extensions/.keep +0 -0
- data/lib/rubyfox/server/data/extensions/__lib__/.keep +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/.keep +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/ant-1.6.5.jar +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/core-3.1.1.jar +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/jetty-6.1.26.jar +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/jetty-util-6.1.26.jar +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/jsp-2.1-glassfish-2.1.v20091210.jar +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/jsp-2.1-jetty-6.1.26.jar +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/jsp-api-2.1-glassfish-2.1.v20091210.jar +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/servlet-api-2.5-20081211.jar +0 -0
- data/lib/rubyfox/server/data/lib/Lib/BaseHTTPServer.py +484 -0
- data/lib/rubyfox/server/data/lib/Lib/CGIHTTPServer.py +325 -0
- data/lib/rubyfox/server/data/lib/Lib/ConfigParser.py +472 -0
- data/lib/rubyfox/server/data/lib/Lib/Cookie.py +742 -0
- data/lib/rubyfox/server/data/lib/Lib/HTMLParser.py +383 -0
- data/lib/rubyfox/server/data/lib/Lib/MimeWriter.py +181 -0
- data/lib/rubyfox/server/data/lib/Lib/Queue.py +151 -0
- data/lib/rubyfox/server/data/lib/Lib/SimpleHTTPServer.py +198 -0
- data/lib/rubyfox/server/data/lib/Lib/SimpleXMLRPCServer.py +274 -0
- data/lib/rubyfox/server/data/lib/Lib/SocketServer.py +576 -0
- data/lib/rubyfox/server/data/lib/Lib/StringIO.py +239 -0
- data/lib/rubyfox/server/data/lib/Lib/UserDict$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/UserDict.py +60 -0
- data/lib/rubyfox/server/data/lib/Lib/UserList.py +94 -0
- data/lib/rubyfox/server/data/lib/Lib/UserString.py +182 -0
- data/lib/rubyfox/server/data/lib/Lib/__future__$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/__future__.py +104 -0
- data/lib/rubyfox/server/data/lib/Lib/aifc.py +961 -0
- data/lib/rubyfox/server/data/lib/Lib/anydbm.py +86 -0
- data/lib/rubyfox/server/data/lib/Lib/atexit.py +50 -0
- data/lib/rubyfox/server/data/lib/Lib/base64.py +77 -0
- data/lib/rubyfox/server/data/lib/Lib/bdb.py +563 -0
- data/lib/rubyfox/server/data/lib/Lib/binhex.py +531 -0
- data/lib/rubyfox/server/data/lib/Lib/bisect.py +78 -0
- data/lib/rubyfox/server/data/lib/Lib/calendar.py +246 -0
- data/lib/rubyfox/server/data/lib/Lib/cgi.py +1040 -0
- data/lib/rubyfox/server/data/lib/Lib/chunk.py +167 -0
- data/lib/rubyfox/server/data/lib/Lib/cmd.py +336 -0
- data/lib/rubyfox/server/data/lib/Lib/code$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/code.py +311 -0
- data/lib/rubyfox/server/data/lib/Lib/codecs$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/codecs.py +636 -0
- data/lib/rubyfox/server/data/lib/Lib/codeop$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/codeop.py +131 -0
- data/lib/rubyfox/server/data/lib/Lib/colorsys.py +123 -0
- data/lib/rubyfox/server/data/lib/Lib/commands.py +84 -0
- data/lib/rubyfox/server/data/lib/Lib/compileall.py +148 -0
- data/lib/rubyfox/server/data/lib/Lib/copy.py +330 -0
- data/lib/rubyfox/server/data/lib/Lib/copy_reg$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/copy_reg.py +78 -0
- data/lib/rubyfox/server/data/lib/Lib/datetime$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/datetime.py +2007 -0
- data/lib/rubyfox/server/data/lib/Lib/dbexts.py +726 -0
- data/lib/rubyfox/server/data/lib/Lib/difflib.py +1088 -0
- data/lib/rubyfox/server/data/lib/Lib/dircache.py +44 -0
- data/lib/rubyfox/server/data/lib/Lib/doctest.py +1173 -0
- data/lib/rubyfox/server/data/lib/Lib/dospath.py +341 -0
- data/lib/rubyfox/server/data/lib/Lib/dumbdbm.py +170 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Charset.py +393 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Encoders.py +94 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Errors.py +26 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Generator.py +378 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Header.py +515 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Iterators.py +25 -0
- data/lib/rubyfox/server/data/lib/Lib/email/MIMEAudio.py +71 -0
- data/lib/rubyfox/server/data/lib/Lib/email/MIMEBase.py +24 -0
- data/lib/rubyfox/server/data/lib/Lib/email/MIMEImage.py +45 -0
- data/lib/rubyfox/server/data/lib/Lib/email/MIMEMessage.py +32 -0
- data/lib/rubyfox/server/data/lib/Lib/email/MIMEMultipart.py +37 -0
- data/lib/rubyfox/server/data/lib/Lib/email/MIMENonMultipart.py +24 -0
- data/lib/rubyfox/server/data/lib/Lib/email/MIMEText.py +45 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Message.py +837 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Parser.py +292 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Utils.py +340 -0
- data/lib/rubyfox/server/data/lib/Lib/email/__init__.py +72 -0
- data/lib/rubyfox/server/data/lib/Lib/email/_compat21.py +69 -0
- data/lib/rubyfox/server/data/lib/Lib/email/_compat22.py +70 -0
- data/lib/rubyfox/server/data/lib/Lib/email/_parseaddr.py +480 -0
- data/lib/rubyfox/server/data/lib/Lib/email/base64MIME.py +184 -0
- data/lib/rubyfox/server/data/lib/Lib/email/quopriMIME.py +323 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/__init__.py +2 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/PyBanner048.gif +0 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/audiotest.au +0 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_01.txt +19 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_02.txt +135 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_03.txt +16 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_04.txt +37 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_05.txt +28 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_06.txt +33 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_07.txt +83 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_08.txt +24 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_09.txt +24 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_10.txt +32 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_11.txt +7 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_12.txt +36 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_13.txt +94 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_14.txt +23 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_15.txt +52 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_16.txt +123 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_17.txt +12 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_18.txt +6 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_19.txt +43 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_20.txt +22 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_21.txt +20 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_22.txt +46 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_23.txt +8 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_24.txt +10 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_25.txt +117 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_26.txt +45 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_27.txt +15 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_28.txt +25 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_29.txt +22 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_30.txt +23 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_31.txt +15 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_32.txt +14 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_33.txt +29 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_34.txt +19 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_35.txt +4 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/test_email.py +2718 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/test_email_codecs.py +68 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/test_email_torture.py +136 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/__init__$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/__init__.py +97 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/aliases$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/aliases.py +115 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/ascii.py +35 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/base64_codec.py +62 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/charmap.py +51 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp037.py +280 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1006.py +138 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1026.py +280 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1140.py +45 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1250.py +123 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1251.py +157 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1252.py +76 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1253.py +151 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1254.py +82 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1255.py +143 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1256.py +129 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1257.py +131 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1258.py +90 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp424.py +280 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp437.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp500.py +280 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp737.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp775.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp850.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp852.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp855.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp856.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp857.py +171 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp860.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp861.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp862.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp863.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp864.py +170 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp865.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp866.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp869.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp874.py +171 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp875.py +281 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/hex_codec.py +62 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_1.py +44 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_10.py +90 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_13.py +100 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_14.py +75 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_15.py +52 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_2.py +101 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_3.py +79 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_4.py +94 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_5.py +138 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_6.py +137 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_7.py +124 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_8.py +112 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_9.py +50 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/koi8_r.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/koi8_u.py +54 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/latin_1.py +35 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/mac_cyrillic.py +167 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/mac_greek.py +170 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/mac_iceland.py +166 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/mac_latin2.py +170 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/mac_roman.py +167 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/mac_turkish.py +167 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/mbcs.py +36 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/quopri_codec.py +58 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/raw_unicode_escape.py +30 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/rot_13.py +105 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/undefined.py +34 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/unicode_escape.py +30 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/unicode_internal.py +30 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/utf_16.py +61 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/utf_16_be.py +31 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/utf_16_le.py +31 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/utf_7.py +27 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/utf_8$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/utf_8.py +31 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/uu_codec.py +112 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/zlib_codec.py +63 -0
- data/lib/rubyfox/server/data/lib/Lib/fileinput.py +349 -0
- data/lib/rubyfox/server/data/lib/Lib/fnmatch.py +107 -0
- data/lib/rubyfox/server/data/lib/Lib/formatter.py +454 -0
- data/lib/rubyfox/server/data/lib/Lib/fpformat.py +142 -0
- data/lib/rubyfox/server/data/lib/Lib/ftplib.py +804 -0
- data/lib/rubyfox/server/data/lib/Lib/getopt.py +143 -0
- data/lib/rubyfox/server/data/lib/Lib/glob.py +56 -0
- data/lib/rubyfox/server/data/lib/Lib/gopherlib.py +205 -0
- data/lib/rubyfox/server/data/lib/Lib/gzip.py +390 -0
- data/lib/rubyfox/server/data/lib/Lib/hmac.py +99 -0
- data/lib/rubyfox/server/data/lib/Lib/htmlentitydefs.py +257 -0
- data/lib/rubyfox/server/data/lib/Lib/htmllib.py +475 -0
- data/lib/rubyfox/server/data/lib/Lib/httplib.py +1238 -0
- data/lib/rubyfox/server/data/lib/Lib/imaplib.py +1208 -0
- data/lib/rubyfox/server/data/lib/Lib/imghdr.py +154 -0
- data/lib/rubyfox/server/data/lib/Lib/inspect$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/inspect.py +787 -0
- data/lib/rubyfox/server/data/lib/Lib/isql.py +238 -0
- data/lib/rubyfox/server/data/lib/Lib/javaos$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/javaos.py +395 -0
- data/lib/rubyfox/server/data/lib/Lib/javapath$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/javapath.py +349 -0
- data/lib/rubyfox/server/data/lib/Lib/javashell.py +194 -0
- data/lib/rubyfox/server/data/lib/Lib/jreload.py +119 -0
- data/lib/rubyfox/server/data/lib/Lib/jxxload_help/DiscardHelp.java +59 -0
- data/lib/rubyfox/server/data/lib/Lib/jxxload_help/JavaLoaderFactory.java +9 -0
- data/lib/rubyfox/server/data/lib/Lib/jxxload_help/PackageManager.java +58 -0
- data/lib/rubyfox/server/data/lib/Lib/jxxload_help/PathVFS.java +98 -0
- data/lib/rubyfox/server/data/lib/Lib/jxxload_help/PathVFSJavaLoader.java +49 -0
- data/lib/rubyfox/server/data/lib/Lib/keyword.py +97 -0
- data/lib/rubyfox/server/data/lib/Lib/linecache$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/linecache.py +101 -0
- data/lib/rubyfox/server/data/lib/Lib/macpath.py +242 -0
- data/lib/rubyfox/server/data/lib/Lib/macurl2path.py +95 -0
- data/lib/rubyfox/server/data/lib/Lib/mailbox.py +313 -0
- data/lib/rubyfox/server/data/lib/Lib/mailcap.py +255 -0
- data/lib/rubyfox/server/data/lib/Lib/markupbase.py +317 -0
- data/lib/rubyfox/server/data/lib/Lib/marshal.py +315 -0
- data/lib/rubyfox/server/data/lib/Lib/mhlib.py +1003 -0
- data/lib/rubyfox/server/data/lib/Lib/mimetools.py +226 -0
- data/lib/rubyfox/server/data/lib/Lib/mimetypes.py +435 -0
- data/lib/rubyfox/server/data/lib/Lib/mimify.py +464 -0
- data/lib/rubyfox/server/data/lib/Lib/multifile.py +160 -0
- data/lib/rubyfox/server/data/lib/Lib/mutex.py +51 -0
- data/lib/rubyfox/server/data/lib/Lib/netrc.py +108 -0
- data/lib/rubyfox/server/data/lib/Lib/nntplib.py +575 -0
- data/lib/rubyfox/server/data/lib/Lib/ntpath.py +482 -0
- data/lib/rubyfox/server/data/lib/Lib/nturl2path.py +66 -0
- data/lib/rubyfox/server/data/lib/Lib/pawt/__init__.py +35 -0
- data/lib/rubyfox/server/data/lib/Lib/pawt/colors.py +144 -0
- data/lib/rubyfox/server/data/lib/Lib/pawt/swing.py +42 -0
- data/lib/rubyfox/server/data/lib/Lib/pdb.py +979 -0
- data/lib/rubyfox/server/data/lib/Lib/pickle.py +990 -0
- data/lib/rubyfox/server/data/lib/Lib/pipes.py +297 -0
- data/lib/rubyfox/server/data/lib/Lib/popen2.py +304 -0
- data/lib/rubyfox/server/data/lib/Lib/poplib.py +335 -0
- data/lib/rubyfox/server/data/lib/Lib/posixfile.py +240 -0
- data/lib/rubyfox/server/data/lib/Lib/posixpath.py +414 -0
- data/lib/rubyfox/server/data/lib/Lib/pprint.py +310 -0
- data/lib/rubyfox/server/data/lib/Lib/profile.py +556 -0
- data/lib/rubyfox/server/data/lib/Lib/pstats.py +641 -0
- data/lib/rubyfox/server/data/lib/Lib/pyclbr.py +337 -0
- data/lib/rubyfox/server/data/lib/Lib/quopri.py +237 -0
- data/lib/rubyfox/server/data/lib/Lib/random$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/random.py +779 -0
- data/lib/rubyfox/server/data/lib/Lib/re$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/re.py +11 -0
- data/lib/rubyfox/server/data/lib/Lib/reconvert.py +192 -0
- data/lib/rubyfox/server/data/lib/Lib/reindex$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/repr.py +95 -0
- data/lib/rubyfox/server/data/lib/Lib/rfc822.py +1010 -0
- data/lib/rubyfox/server/data/lib/Lib/sched.py +106 -0
- data/lib/rubyfox/server/data/lib/Lib/select.py +211 -0
- data/lib/rubyfox/server/data/lib/Lib/servlet-api-2.5-20081211.jar +0 -0
- data/lib/rubyfox/server/data/lib/Lib/setsfactory.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/sfs2x-lms.jar +0 -0
- data/lib/rubyfox/server/data/lib/Lib/sgmllib.py +516 -0
- data/lib/rubyfox/server/data/lib/Lib/shelve.py +158 -0
- data/lib/rubyfox/server/data/lib/Lib/shlex.py +209 -0
- data/lib/rubyfox/server/data/lib/Lib/shutil$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/shutil.py +138 -0
- data/lib/rubyfox/server/data/lib/Lib/site.py +263 -0
- data/lib/rubyfox/server/data/lib/Lib/smtplib.py +729 -0
- data/lib/rubyfox/server/data/lib/Lib/sndhdr.py +228 -0
- data/lib/rubyfox/server/data/lib/Lib/socket.py +902 -0
- data/lib/rubyfox/server/data/lib/Lib/sre$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/sre.py +311 -0
- data/lib/rubyfox/server/data/lib/Lib/sre_compile$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/sre_compile.py +455 -0
- data/lib/rubyfox/server/data/lib/Lib/sre_constants$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/sre_constants.py +259 -0
- data/lib/rubyfox/server/data/lib/Lib/sre_parse$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/sre_parse.py +738 -0
- data/lib/rubyfox/server/data/lib/Lib/stat$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/stat.py +86 -0
- data/lib/rubyfox/server/data/lib/Lib/string$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/string.py +437 -0
- data/lib/rubyfox/server/data/lib/Lib/symbol.py +95 -0
- data/lib/rubyfox/server/data/lib/Lib/telnetlib.py +662 -0
- data/lib/rubyfox/server/data/lib/Lib/tempfile.py +255 -0
- data/lib/rubyfox/server/data/lib/Lib/test/Graph.py +62 -0
- data/lib/rubyfox/server/data/lib/Lib/test/README +372 -0
- data/lib/rubyfox/server/data/lib/Lib/test/__init__.py +1 -0
- data/lib/rubyfox/server/data/lib/Lib/test/audiotest.au +0 -0
- data/lib/rubyfox/server/data/lib/Lib/test/autotest.py +6 -0
- data/lib/rubyfox/server/data/lib/Lib/test/badsyntax_future3.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/badsyntax_future4.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/badsyntax_future5.py +12 -0
- data/lib/rubyfox/server/data/lib/Lib/test/badsyntax_future6.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/badsyntax_future7.py +11 -0
- data/lib/rubyfox/server/data/lib/Lib/test/badsyntax_nocaret.py +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/blob.jar +0 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/bugs100.py +139 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/bugs101.py +57 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/jdkbugs.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr101.py +59 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr104.py +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr112.py +14 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr119.py +16 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr127.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr133/__init__.py +1 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr133/test.py +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr133.py +12 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr134.py +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr139.py +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr142.py +1 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr144.py +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr148.py +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr149.py +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr155.py +13 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr170.py +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr171.py +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr174.py +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr178.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr183.py +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr186.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr191.py +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr192.py +81 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr195.py +11 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr208.py +26 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr233.py +8 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr234.py +16 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr235.py +14 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr239.py +6 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr241.py +16 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr242.py +12 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/PyBanner048.gif +0 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_01.txt +19 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_02.txt +135 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_03.txt +16 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_04.txt +37 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_05.txt +28 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_06.txt +33 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_07.txt +83 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_08.txt +24 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_09.txt +24 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_10.txt +32 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_11.txt +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_12.txt +36 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_13.txt +94 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_14.txt +23 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_15.txt +52 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_16.txt +123 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_17.txt +12 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_18.txt +6 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_19.txt +43 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_20.txt +22 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_21.txt +22 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_22.txt +46 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_23.txt +8 -0
- data/lib/rubyfox/server/data/lib/Lib/test/double_const.py +30 -0
- data/lib/rubyfox/server/data/lib/Lib/test/greyrgb.uue +1547 -0
- data/lib/rubyfox/server/data/lib/Lib/test/javatests/AnonInner.java +20 -0
- data/lib/rubyfox/server/data/lib/Lib/test/javatests/Foo.java +3 -0
- data/lib/rubyfox/server/data/lib/Lib/test/javatests/JOverload.java +132 -0
- data/lib/rubyfox/server/data/lib/Lib/test/javatests/ListTest.java +638 -0
- data/lib/rubyfox/server/data/lib/Lib/test/javatests/SubFoo.java +3 -0
- data/lib/rubyfox/server/data/lib/Lib/test/javatests/TestSupport.java +49 -0
- data/lib/rubyfox/server/data/lib/Lib/test/javatests/__init__.py +0 -0
- data/lib/rubyfox/server/data/lib/Lib/test/jser2_classes.py +47 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_MimeWriter +110 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_array +4 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_asynchat +3 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_augassign +51 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_binascii +29 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_builtin +53 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_cfgparser +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_cgi +29 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_charmapcodec +16 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_class +101 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_coercion +1054 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_compare +101 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_compile +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_cookie +32 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_exceptions +52 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_extcall +112 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_frozen +4 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_future +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_gettext +46 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_global +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_grammar +66 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_httplib +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_janoninner +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_javalist +6 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_jbasic +13 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_jser +12 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_jsubclass +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_linuxaudiodev +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_longexp +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_math +26 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_md5 +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_methods +6 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_mimetools +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_mmap +34 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_new +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_nis +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_opcodes +4 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_openpty +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_operations +28 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_pkg +45 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_poll +17 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_popen2 +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_posixpath +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_pow +17 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_profile +17 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_pty +3 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_pwd +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_pyexpat +110 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_re +15 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_regex +29 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_rgbimg +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_richcmp +187 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_rotor +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_scope +24 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_signal +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_string +18 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_thread +4 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_threadedtempfile +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_time +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_tokenize +648 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_types +15 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_ucn +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_unicode +21 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_unicode_file +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_unicodedata +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_unpack +15 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_urlparse +47 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_winreg +3 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_winsound +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_xreadline +4 -0
- data/lib/rubyfox/server/data/lib/Lib/test/pickletester.py +285 -0
- data/lib/rubyfox/server/data/lib/Lib/test/pydocfodder.py +210 -0
- data/lib/rubyfox/server/data/lib/Lib/test/pystone.py +252 -0
- data/lib/rubyfox/server/data/lib/Lib/test/re_tests.py +590 -0
- data/lib/rubyfox/server/data/lib/Lib/test/regex_tests.py +287 -0
- data/lib/rubyfox/server/data/lib/Lib/test/regrtest.py +1096 -0
- data/lib/rubyfox/server/data/lib/Lib/test/reperf.py +23 -0
- data/lib/rubyfox/server/data/lib/Lib/test/sortperf.py +141 -0
- data/lib/rubyfox/server/data/lib/Lib/test/string_tests.py +265 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test.xml +115 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test.xml.out +115 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_MimeWriter.py +170 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_SimpleXMLRPCServer.py +88 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_StringIO.py +113 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test___all__.py +158 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test___future__.py +59 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_al.py +23 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_array.py +438 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_asynchat.py +58 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_atexit.py +66 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_audioop.py +264 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_augassign.py +261 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_b1.py +632 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_b2.py +365 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_base64.py +53 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_bastion.py +3 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_binascii.py +119 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_binhex.py +50 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_binop.py +328 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_bisect.py +127 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_bsddb.py +76 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_bufio.py +60 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_bugfixes.py +31 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_builtin.py +13 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_calendar.py +61 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_call.py +131 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_capi.py +16 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_cd.py +26 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_cfgparser.py +284 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_cgi.py +188 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_charmapcodec.py +43 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_cl.py +78 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_class.py +317 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_cmath.py +35 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_codecs.py +31 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_codeop.py +190 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_coercion.py +118 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_commands.py +52 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_compare.py +56 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_compile.py +129 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_complex.py +68 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_contains.py +133 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_cookie.py +47 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_copy_reg.py +30 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_cpickle.py +81 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_crypt.py +11 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_curses.py +210 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_datetime.py +2958 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_dbm.py +43 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_descr.py +4094 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_descrtut.py +501 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_difflib.py +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_dircache.py +74 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_dl.py +33 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_doctest.py +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_doctest2.py +108 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_dospath.py +61 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_dumbdbm.py +79 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_email.py +13 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_email_codecs.py +11 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_enumerate.py +150 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_errno.py +49 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_exceptions.py +206 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_extcall.py +268 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_fcntl.py +53 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_file.py +63 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_fileinput.py +159 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_fnmatch.py +46 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_fork1.py +75 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_format.py +218 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_fpformat.py +75 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_frozen.py +26 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_funcattrs.py +384 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_future.py +47 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_future1.py +11 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_future2.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_future3.py +11 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_gc.py +346 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_gdbm.py +46 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_generators.py +1385 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_getargs.py +26 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_getopt.py +110 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_gettext.py +200 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_gl.py +150 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_glob.py +115 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_global.py +51 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_grammar.py +732 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_grp.py +27 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_gzip.py +82 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_hash.py +36 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_hmac.py +108 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_hotshot.py +117 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_htmllib.py +42 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_htmlparser.py +294 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_httplib.py +58 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_imageop.py +171 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_imgfile.py +116 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_import.py +71 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_importhooks.py +215 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_inspect.py +365 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_iter.py +784 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_janoninner.py +15 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_javalist.py +53 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_javashell.py +182 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_jbasic.py +119 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_joverload.py +138 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_jreload.py +33 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_jser.py +57 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_jser2.py +93 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_jsubclass.py +49 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_jy_compile.py +168 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_jy_generators.py +165 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_jy_internals.py +130 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_largefile.py +169 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_linuxaudiodev.py +89 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_locale.py +44 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_long.py +445 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_long_future.py +55 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_long_int_args.py +61 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_longexp.py +16 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_mailbox.py +113 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_marshal.py +44 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_math.py +153 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_md5.py +30 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_methods.py +62 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_mhlib.py +353 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_mimetools.py +18 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_mimetypes.py +59 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_minidom.py +648 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_mmap.py +317 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_module.py +77 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_multifile.py +66 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_mutants.py +285 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_netrc.py +42 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_new.py +108 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_nis.py +32 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_ntpath.py +114 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_opcodes.py +65 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_openpty.py +21 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_operations.py +475 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_operator.py +218 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_os.py +187 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_parser.py +383 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pep247.py +50 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pickle.py +40 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pkg.py +259 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pkgimport.py +84 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_poll.py +3 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_popen2.py +72 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_posixpath.py +40 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pow.py +107 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pprint.py +104 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_profile.py +86 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_profilehooks.py +360 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pty.py +98 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pwd.py +71 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pyclbr.py +154 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pyexpat.py +202 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_queue.py +158 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_quopri.py +157 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_random.py +19 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_re.py +304 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_regex.py +113 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_repr.py +278 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_rfc822.py +211 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_rgbimg.py +63 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_richcmp.py +261 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_rotor.py +28 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_sax.py +727 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_scope.py +530 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_select.py +228 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_select_new.py +229 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_sets.py +793 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_sgmllib.py +314 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_sha.py +52 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_signal.py +66 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_socket.py +1116 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_socket_ssl.py +27 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_socketserver.py +165 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_sre.py +434 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_str2unicode.py +90 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_strftime.py +146 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_string.py +223 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_strop.py +133 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_struct.py +441 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_structseq.py +28 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_subclasses.py +204 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_sunaudiodev.py +28 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_sundry.py +102 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_support.py +265 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_symtable.py +8 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_tempfile.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_thread.py +116 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_threaded_import.py +56 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_threadedtempfile.py +86 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_threading.py +55 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_time.py +47 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_timing.py +21 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_tokenize.py +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_trace.py +219 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_traceback.py +49 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_types.py +762 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_ucn.py +113 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_unary.py +58 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_unicode.py +815 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_unicode_file.py +95 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_unicodedata.py +125 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_unpack.py +105 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_urllib.py +109 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_urllib2.py +31 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_urlparse.py +94 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_userdict.py +120 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_userlist.py +269 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_userstring.py +43 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_uu.py +158 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_wave.py +34 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_weakref.py +573 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_winreg.py +151 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_winsound.py +6 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_xmllib.py +35 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_xmlrpc.py +37 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_xreadline.py +43 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_zipfile.py +78 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_zlib.py +482 -0
- data/lib/rubyfox/server/data/lib/Lib/test/testall.py +43 -0
- data/lib/rubyfox/server/data/lib/Lib/test/testcodec.py +48 -0
- data/lib/rubyfox/server/data/lib/Lib/test/testimg.uue +1170 -0
- data/lib/rubyfox/server/data/lib/Lib/test/testimgr.uue +1170 -0
- data/lib/rubyfox/server/data/lib/Lib/test/testrgb.uue +971 -0
- data/lib/rubyfox/server/data/lib/Lib/test/tokenize_tests.py +175 -0
- data/lib/rubyfox/server/data/lib/Lib/test/whrandom.py +96 -0
- data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/dbextstest.py +266 -0
- data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/jndi.py +33 -0
- data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/runner.py +204 -0
- data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/sptest.py +227 -0
- data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/test.xml +363 -0
- data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/test_zxjdbc_dbapi20.py +26 -0
- data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/zxtest.py +1242 -0
- data/lib/rubyfox/server/data/lib/Lib/this.py +28 -0
- data/lib/rubyfox/server/data/lib/Lib/threading.py +698 -0
- data/lib/rubyfox/server/data/lib/Lib/token$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/token.py +140 -0
- data/lib/rubyfox/server/data/lib/Lib/tokenize$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/tokenize.py +287 -0
- data/lib/rubyfox/server/data/lib/Lib/traceback$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/traceback.py +301 -0
- data/lib/rubyfox/server/data/lib/Lib/tzparse.py +98 -0
- data/lib/rubyfox/server/data/lib/Lib/unittest.py +723 -0
- data/lib/rubyfox/server/data/lib/Lib/urllib.py +1465 -0
- data/lib/rubyfox/server/data/lib/Lib/urllib2.py +1144 -0
- data/lib/rubyfox/server/data/lib/Lib/urlparse.py +276 -0
- data/lib/rubyfox/server/data/lib/Lib/user.py +45 -0
- data/lib/rubyfox/server/data/lib/Lib/uu.py +195 -0
- data/lib/rubyfox/server/data/lib/Lib/warnings$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/warnings.py +258 -0
- data/lib/rubyfox/server/data/lib/Lib/weakref.py +280 -0
- data/lib/rubyfox/server/data/lib/Lib/whichdb.py +87 -0
- data/lib/rubyfox/server/data/lib/Lib/whrandom.py +140 -0
- data/lib/rubyfox/server/data/lib/Lib/xdrlib.py +285 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/FtCore.py +58 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/Uri.py +380 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/__init__.py +41 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/dom/MessageSource.py +54 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/dom/NodeFilter.py +27 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/dom/__init__.py +232 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/dom/domreg.py +99 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/dom/minicompat.py +184 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/dom/minidom.py +1943 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/dom/pulldom.py +350 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/dom/xmlbuilder.py +388 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/sax/__init__.py +102 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/sax/_exceptions.py +127 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/sax/drivers2/__init__.py +1 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/sax/drivers2/drv_javasax.py +333 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/sax/handler.py +345 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/sax/saxlib.py +430 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/sax/saxutils.py +813 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/sax/xmlreader.py +378 -0
- data/lib/rubyfox/server/data/lib/Lib/xmllib.py +926 -0
- data/lib/rubyfox/server/data/lib/Lib/xmlrpclib.py +1019 -0
- data/lib/rubyfox/server/data/lib/Lib/zipfile.py +586 -0
- data/lib/rubyfox/server/data/lib/Lib/zlib.py +156 -0
- data/lib/rubyfox/server/data/lib/boot.jar +0 -0
- data/lib/rubyfox/server/data/lib/cachedir/.keep +0 -0
- data/lib/rubyfox/server/data/lib/commons-beanutils-1.7.0.jar +0 -0
- data/lib/rubyfox/server/data/lib/commons-collections-3.2.1.jar +0 -0
- data/lib/rubyfox/server/data/lib/commons-dbcp-1.4.jar +0 -0
- data/lib/rubyfox/server/data/lib/commons-io-1.4.jar +0 -0
- data/lib/rubyfox/server/data/lib/commons-lang-2.4.jar +0 -0
- data/lib/rubyfox/server/data/lib/commons-logging-1.1.1.jar +0 -0
- data/lib/rubyfox/server/data/lib/commons-pool-1.5.4.jar +0 -0
- data/lib/rubyfox/server/data/lib/commons-vfs-1.0.jar +0 -0
- data/lib/rubyfox/server/data/lib/ezmorph-1.0.6.jar +0 -0
- data/lib/rubyfox/server/data/lib/httpclient-4.0.3.jar +0 -0
- data/lib/rubyfox/server/data/lib/httpcore-4.0.1.jar +0 -0
- data/lib/rubyfox/server/data/lib/imap.jar +0 -0
- data/lib/rubyfox/server/data/lib/jconsole/COPYING.txt +504 -0
- data/lib/rubyfox/server/data/lib/jconsole/bug_test_case.py +49 -0
- data/lib/rubyfox/server/data/lib/jconsole/console$py.class +0 -0
- data/lib/rubyfox/server/data/lib/jconsole/console.py +439 -0
- data/lib/rubyfox/server/data/lib/jconsole/history$py.class +0 -0
- data/lib/rubyfox/server/data/lib/jconsole/history.py +82 -0
- data/lib/rubyfox/server/data/lib/jconsole/history_test_case.py +133 -0
- data/lib/rubyfox/server/data/lib/jconsole/introspect$py.class +0 -0
- data/lib/rubyfox/server/data/lib/jconsole/introspect.py +373 -0
- data/lib/rubyfox/server/data/lib/jconsole/introspect_test_case.py +19 -0
- data/lib/rubyfox/server/data/lib/jconsole/issue_17_test_case.py +36 -0
- data/lib/rubyfox/server/data/lib/jconsole/jintrospect$py.class +0 -0
- data/lib/rubyfox/server/data/lib/jconsole/jintrospect.py +316 -0
- data/lib/rubyfox/server/data/lib/jconsole/jintrospect_test_case.py +107 -0
- data/lib/rubyfox/server/data/lib/jconsole/popup$py.class +0 -0
- data/lib/rubyfox/server/data/lib/jconsole/popup.py +178 -0
- data/lib/rubyfox/server/data/lib/jconsole/run_tests.py +8 -0
- data/lib/rubyfox/server/data/lib/jconsole/static_test_case.py +36 -0
- data/lib/rubyfox/server/data/lib/jconsole/testcase.py +38 -0
- data/lib/rubyfox/server/data/lib/jconsole/tip$py.class +0 -0
- data/lib/rubyfox/server/data/lib/jconsole/tip.py +47 -0
- data/lib/rubyfox/server/data/lib/jmx-util-1.2.3.jar +0 -0
- data/lib/rubyfox/server/data/lib/joda-time-1.6.jar +0 -0
- data/lib/rubyfox/server/data/lib/js.jar +0 -0
- data/lib/rubyfox/server/data/lib/json-lib-2.2.3-jdk15.jar +0 -0
- data/lib/rubyfox/server/data/lib/jython.jar +0 -0
- data/lib/rubyfox/server/data/lib/log4j-1.2.15.jar +0 -0
- data/lib/rubyfox/server/data/lib/logs-backup-app.jar +0 -0
- data/lib/rubyfox/server/data/lib/mailapi.jar +0 -0
- data/lib/rubyfox/server/data/lib/pop3.jar +0 -0
- data/lib/rubyfox/server/data/lib/scala-library.jar +0 -0
- data/lib/rubyfox/server/data/lib/sfs2x-admin.jar +0 -0
- data/lib/rubyfox/server/data/lib/sfs2x-core.jar +0 -0
- data/lib/rubyfox/server/data/lib/sfs2x-util.jar +0 -0
- data/lib/rubyfox/server/data/lib/sfs2x.jar +0 -0
- data/lib/rubyfox/server/data/lib/slf4j-api-1.5.10.jar +0 -0
- data/lib/rubyfox/server/data/lib/slf4j-log4j12.jar +0 -0
- data/lib/rubyfox/server/data/lib/smtp.jar +0 -0
- data/lib/rubyfox/server/data/lib/terracotta-api-1.1.1.jar +0 -0
- data/lib/rubyfox/server/data/lib/ws-engine.jar +0 -0
- data/lib/rubyfox/server/data/lib/xpp3_min-1.1.4c.jar +0 -0
- data/lib/rubyfox/server/data/lib/xstream-1.3.1.jar +0 -0
- data/lib/rubyfox/server/data/logs/.keep +0 -0
- data/lib/rubyfox/server/data/logs/bluebox/.keep +0 -0
- data/lib/rubyfox/server/data/logs/boot/.keep +0 -0
- data/lib/rubyfox/server/data/logs/http/.keep +0 -0
- data/lib/rubyfox/server/data/logs/smartfox.log +295 -0
- data/lib/rubyfox/server/data/root/.keep +0 -0
- data/lib/rubyfox/server/data/root/_css_/default.css +170 -0
- data/lib/rubyfox/server/data/root/_css_/reset.css +49 -0
- data/lib/rubyfox/server/data/root/_images_/background_gradient.png +0 -0
- data/lib/rubyfox/server/data/root/_images_/background_logo.png +0 -0
- data/lib/rubyfox/server/data/root/_images_/favicon.png +0 -0
- data/lib/rubyfox/server/data/root/_images_/logo_smartfoxserver.png +0 -0
- data/lib/rubyfox/server/data/root/admin/.keep +0 -0
- data/lib/rubyfox/server/data/root/admin/AdminTool.html +108 -0
- data/lib/rubyfox/server/data/root/admin/AdminTool.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/ReleaseNotes.txt +29 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/adobeFlashPlayer.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/advanced.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/banManager.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/bannedIPs.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/bannedUsernames.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/bookmarks.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/bootLog.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/buddyList.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/buddyProperties.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/connection.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/databaseManager.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/floodFilter.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/gameSettings.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/general.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/globalServerStatus.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/iPFilter.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/jVMSettings.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/logsDownload.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/mailer.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/permissionsAndEvents.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/privilegeManager.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/remoteAdmin.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/roomExtension.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/roomVariables.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/roomsAndGroups.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/runtimeLog.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/runtimeRoomSettings.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/runtimeUserSettings.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/runtimeZoneSettings.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/systemQueueStatus.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/userManagement.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/userVariables.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/usersTraffic.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/webServer.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/wordsFilter.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/zoneExtension.png +0 -0
- data/lib/rubyfox/server/data/root/admin/index.html +108 -0
- data/lib/rubyfox/server/data/root/admin/modules/BanManager/BanManager.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/BanManager/icon.png +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/BlueBoxMonitor/BlueBoxMonitor.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/BlueBoxMonitor/icon.png +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/LicenseManager/LicenseManager.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/LicenseManager/icon.png +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/LogViewer/LogViewer.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/LogViewer/icon.png +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/RuntimeStatistics/RuntimeStatistics.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/RuntimeStatistics/icon.png +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/ServerConfigurator/ServerConfigurator.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/ServerConfigurator/icon.png +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/ZoneConfigurator/ZoneConfigurator.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/ZoneConfigurator/icon.png +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/ZoneMonitor/ZoneMonitor.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/ZoneMonitor/icon.png +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/config.xml +12 -0
- data/lib/rubyfox/server/data/root/admin/playerProductInstall.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/swfobject.js +777 -0
- data/lib/rubyfox/server/data/root/crossdomain.xml +6 -0
- data/lib/rubyfox/server/data/root/index.html +63 -0
- data/lib/rubyfox/server/data/sfs2x-service +435 -0
- data/lib/rubyfox/server/data/sfs2x-service.vmoptions +5 -0
- data/lib/rubyfox/server/data/sfs2x.sh +12 -0
- data/lib/rubyfox/server/data/www/.keep +0 -0
- data/lib/rubyfox/server/data/www/BlueBox.war +0 -0
- data/lib/rubyfox/server/data/www/root/_css_/default.css +170 -0
- data/lib/rubyfox/server/data/www/root/_css_/reset.css +49 -0
- data/lib/rubyfox/server/data/www/root/_images_/background_gradient.png +0 -0
- data/lib/rubyfox/server/data/www/root/_images_/background_logo.png +0 -0
- data/lib/rubyfox/server/data/www/root/_images_/favicon.png +0 -0
- data/lib/rubyfox/server/data/www/root/_images_/logo_smartfoxserver.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/.keep +0 -0
- data/lib/rubyfox/server/data/www/root/admin/AdminTool.html +108 -0
- data/lib/rubyfox/server/data/www/root/admin/AdminTool.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/ReleaseNotes.txt +63 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/adobeFlashPlayer.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/advanced.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/banManager.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/bannedIPs.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/bannedUsernames.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/bookmarks.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/bootLog.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/buddyList.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/buddyProperties.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/connection.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/databaseManager.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/floodFilter.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/gameSettings.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/general.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/globalServerStatus.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/hTML5WebSockets.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/iPFilter.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/jVMSettings.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/logsDownload.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/mailer.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/permissionsAndEvents.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/privilegeManager.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/remoteAdmin.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/roomExtension.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/roomVariables.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/roomsAndGroups.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/runtimeLog.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/runtimeRoomSettings.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/runtimeUserSettings.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/runtimeZoneSettings.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/systemQueueStatus.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/userManagement.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/userVariables.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/usersTraffic.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/webServer.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/wordsFilter.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/zoneExtension.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/index.html +108 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/BanManager/BanManager.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/BanManager/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/BlueBoxMonitor/BlueBoxMonitor.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/BlueBoxMonitor/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/Dashboard/Dashboard.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/Dashboard/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/LicenseManager/LicenseManager.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/LicenseManager/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/LogViewer/LogViewer.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/LogViewer/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/RuntimeStatistics/RuntimeStatistics.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/RuntimeStatistics/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/ServerConfigurator/ServerConfigurator.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/ServerConfigurator/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/ZoneConfigurator/ZoneConfigurator.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/ZoneConfigurator/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/ZoneMonitor/ZoneMonitor.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/ZoneMonitor/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/config.xml +12 -0
- data/lib/rubyfox/server/data/www/root/admin/playerProductInstall.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/swfobject.js +777 -0
- data/lib/rubyfox/server/data/www/root/crossdomain.xml +6 -0
- data/lib/rubyfox/server/data/www/root/examples/.keep +0 -0
- data/lib/rubyfox/server/data/www/root/examples/index.html +43 -0
- data/lib/rubyfox/server/data/www/root/index.html +63 -0
- data/lib/rubyfox/server/data/zones/.keep +0 -0
- data/lib/rubyfox/server/environment.rb +31 -0
- data/lib/rubyfox/server/version.rb +5 -0
- data/lib/rubyfox/server.rb +9 -0
- data/rubyfox-server.gemspec +22 -0
- metadata +1076 -0
@@ -0,0 +1,1242 @@
|
|
1
|
+
|
2
|
+
# Jython Database Specification API 2.0
|
3
|
+
#
|
4
|
+
# $Id: zxtest.py 2281 2003-04-10 20:17:43Z bzimmer $
|
5
|
+
#
|
6
|
+
# Copyright (c) 2001 brian zimmer <bzimmer@ziclix.com>
|
7
|
+
|
8
|
+
from com.ziclix.python.sql import zxJDBC
|
9
|
+
from java.util import Calendar, Date as JDate
|
10
|
+
|
11
|
+
import tempfile, os, time, runner
|
12
|
+
|
13
|
+
class zxCoreTestCase(runner.SQLTestCase):
|
14
|
+
|
15
|
+
def setUp(self):
|
16
|
+
runner.SQLTestCase.setUp(self)
|
17
|
+
self.db = self.connect()
|
18
|
+
self.db.autocommit = 0
|
19
|
+
|
20
|
+
def tearDown(self):
|
21
|
+
self.db.close()
|
22
|
+
runner.SQLTestCase.tearDown(self)
|
23
|
+
|
24
|
+
def connect(self):
|
25
|
+
factory = runner.__imp__(self.factory.classname)
|
26
|
+
args = map(lambda x: x[1], self.factory.arguments)
|
27
|
+
connect = getattr(factory, self.factory.method)
|
28
|
+
return apply(connect, args, self.factory.keywords)
|
29
|
+
|
30
|
+
def cursor(self, *args, **kws):
|
31
|
+
c = apply(self.db.cursor, args, kws)
|
32
|
+
if hasattr(self, "datahandler"):
|
33
|
+
c.datahandler = self.datahandler(c.datahandler)
|
34
|
+
return c
|
35
|
+
|
36
|
+
class zxJDBCTestCase(zxCoreTestCase):
|
37
|
+
|
38
|
+
def setUp(self):
|
39
|
+
zxCoreTestCase.setUp(self)
|
40
|
+
|
41
|
+
c = self.cursor()
|
42
|
+
|
43
|
+
try:
|
44
|
+
c.execute("drop table zxtesting")
|
45
|
+
self.db.commit()
|
46
|
+
except:
|
47
|
+
self.db.rollback()
|
48
|
+
|
49
|
+
try:
|
50
|
+
c.execute("create table zxtesting (id int not null, name varchar(32), state varchar(32), primary key (id))")
|
51
|
+
self.db.commit()
|
52
|
+
c.execute("insert into zxtesting (id, name, state) values (1, 'test0', 'il')")
|
53
|
+
c.execute("insert into zxtesting (id, name, state) values (2, 'test1', 'wi')")
|
54
|
+
c.execute("insert into zxtesting (id, name, state) values (3, 'test2', 'tx')")
|
55
|
+
c.execute("insert into zxtesting (id, name, state) values (4, 'test3', 'co')")
|
56
|
+
c.execute("insert into zxtesting (id, name, state) values (5, 'test4', 'il')")
|
57
|
+
c.execute("insert into zxtesting (id, name, state) values (6, 'test5', 'ca')")
|
58
|
+
c.execute("insert into zxtesting (id, name, state) values (7, 'test6', 'wi')")
|
59
|
+
self.db.commit()
|
60
|
+
finally:
|
61
|
+
c.close()
|
62
|
+
|
63
|
+
def tearDown(self):
|
64
|
+
|
65
|
+
c = self.cursor()
|
66
|
+
try:
|
67
|
+
try:
|
68
|
+
c.execute("drop table zxtesting")
|
69
|
+
except:
|
70
|
+
self.db.rollback()
|
71
|
+
finally:
|
72
|
+
c.close()
|
73
|
+
|
74
|
+
zxCoreTestCase.tearDown(self)
|
75
|
+
|
76
|
+
class zxAPITestCase(zxJDBCTestCase):
|
77
|
+
|
78
|
+
def testConnection(self):
|
79
|
+
"""testing connection"""
|
80
|
+
assert self.db, "invalid connection"
|
81
|
+
|
82
|
+
def testAutocommit(self):
|
83
|
+
"""testing autocommit functionality"""
|
84
|
+
if self.db.__connection__.getMetaData().supportsTransactions():
|
85
|
+
self.db.autocommit = 1
|
86
|
+
self.assertEquals(1, self.db.__connection__.getAutoCommit())
|
87
|
+
self.db.autocommit = 0
|
88
|
+
self.assertEquals(0, self.db.__connection__.getAutoCommit())
|
89
|
+
|
90
|
+
def testSimpleQuery(self):
|
91
|
+
"""testing simple queries with cursor.execute(), no parameters"""
|
92
|
+
c = self.cursor()
|
93
|
+
try:
|
94
|
+
c.execute("select count(*) from zxtesting")
|
95
|
+
f = c.fetchall()
|
96
|
+
assert len(f) == 1, "expecting one row"
|
97
|
+
c.execute("select * from zxtesting")
|
98
|
+
data = c.fetchone()
|
99
|
+
assert len(f) == 1, "expecting one row"
|
100
|
+
assert data[0] == 1, "expected [1] rows, got [%d]" % (data[0])
|
101
|
+
finally:
|
102
|
+
c.close()
|
103
|
+
|
104
|
+
def testNoneQuery(self):
|
105
|
+
"""testing that executing None doesn't fail"""
|
106
|
+
c = self.cursor()
|
107
|
+
try:
|
108
|
+
c.execute(None)
|
109
|
+
finally:
|
110
|
+
c.close()
|
111
|
+
|
112
|
+
def _test_preparedstatement(self, dynamic):
|
113
|
+
c = self.cursor(dynamic)
|
114
|
+
try:
|
115
|
+
p = c.prepare("select * from zxtesting where id = ?")
|
116
|
+
for i in range(1, 8):
|
117
|
+
c.execute(p, (i,))
|
118
|
+
data = c.fetchall()
|
119
|
+
self.assertEquals(1, len(data))
|
120
|
+
assert not p.closed
|
121
|
+
p.close()
|
122
|
+
assert p.closed
|
123
|
+
self.assertRaises(zxJDBC.ProgrammingError, c.execute, p, (1,))
|
124
|
+
finally:
|
125
|
+
c.close()
|
126
|
+
|
127
|
+
def testStaticPrepare(self):
|
128
|
+
"""testing the prepare() functionality for static cursors"""
|
129
|
+
self._test_preparedstatement(0)
|
130
|
+
|
131
|
+
def testDynamicPrepare(self):
|
132
|
+
"""testing the prepare() functionality for dynamic cursors"""
|
133
|
+
self._test_preparedstatement(1)
|
134
|
+
|
135
|
+
def _test_cursorkeywords(self, *args, **kws):
|
136
|
+
c = self.cursor(*args, **kws)
|
137
|
+
try:
|
138
|
+
c.execute("select * from zxtesting")
|
139
|
+
data = c.fetchmany(1)
|
140
|
+
assert len(data) == 1, "expecting one row"
|
141
|
+
finally:
|
142
|
+
c.close()
|
143
|
+
|
144
|
+
def testCursorKeywords(self):
|
145
|
+
"""testing the creation of a cursor with keywords"""
|
146
|
+
self._test_cursorkeywords(dynamic=1)
|
147
|
+
self._test_cursorkeywords(dynamic=1,
|
148
|
+
rstype=zxJDBC.TYPE_SCROLL_INSENSITIVE,
|
149
|
+
rsconcur=zxJDBC.CONCUR_READ_ONLY
|
150
|
+
)
|
151
|
+
self._test_cursorkeywords(1,
|
152
|
+
rstype=zxJDBC.TYPE_SCROLL_INSENSITIVE,
|
153
|
+
rsconcur=zxJDBC.CONCUR_READ_ONLY
|
154
|
+
)
|
155
|
+
self._test_cursorkeywords(1,zxJDBC.TYPE_SCROLL_INSENSITIVE,zxJDBC.CONCUR_READ_ONLY)
|
156
|
+
self.assertRaises(TypeError, self.cursor, 1, zxJDBC.TYPE_SCROLL_INSENSITIVE)
|
157
|
+
|
158
|
+
def testFileLikeCursor(self):
|
159
|
+
"""testing the cursor as a file-like object"""
|
160
|
+
c = self.cursor()
|
161
|
+
try:
|
162
|
+
print >> c, "insert into zxtesting (id, name, state) values (100, 'test100', 'wa')"
|
163
|
+
print >> c, "insert into zxtesting (id, name, state) values (101, 'test101', 'co')"
|
164
|
+
print >> c, "insert into zxtesting (id, name, state) values (102, 'test102', 'or')"
|
165
|
+
self.db.commit()
|
166
|
+
finally:
|
167
|
+
c.close()
|
168
|
+
|
169
|
+
c = self.cursor()
|
170
|
+
try:
|
171
|
+
c.execute("select * from zxtesting where id in (100, 101, 102)")
|
172
|
+
f = c.fetchall()
|
173
|
+
self.assertEquals(3, len(f))
|
174
|
+
finally:
|
175
|
+
c.close()
|
176
|
+
|
177
|
+
def testIteration(self):
|
178
|
+
"""testing the iteration protocol"""
|
179
|
+
c = self.cursor()
|
180
|
+
try:
|
181
|
+
# first with a for loop
|
182
|
+
cnt = 0
|
183
|
+
c.execute("select * from zxtesting")
|
184
|
+
for a in c:
|
185
|
+
self.assertEquals(3, len(a))
|
186
|
+
cnt += 1
|
187
|
+
self.assertEquals(7, cnt)
|
188
|
+
# then with a while loop
|
189
|
+
cnt = 0
|
190
|
+
c.execute("select * from zxtesting")
|
191
|
+
while 1:
|
192
|
+
try:
|
193
|
+
self.assertEquals(3, len(c.next()))
|
194
|
+
except StopIteration:
|
195
|
+
break
|
196
|
+
cnt += 1
|
197
|
+
self.assertEquals(7, cnt)
|
198
|
+
finally:
|
199
|
+
c.close()
|
200
|
+
|
201
|
+
def testClosingCursor(self):
|
202
|
+
"""testing that a closed cursor throws an exception"""
|
203
|
+
c = self.cursor()
|
204
|
+
try:
|
205
|
+
c.execute("select * from zxtesting")
|
206
|
+
finally:
|
207
|
+
c.close()
|
208
|
+
self.assertRaises(zxJDBC.ProgrammingError, c.execute, ("select * from zxtesting",))
|
209
|
+
|
210
|
+
def testClosingConnectionWithOpenCursors(self):
|
211
|
+
"""testing that a closed connection closes any open cursors"""
|
212
|
+
c = self.cursor()
|
213
|
+
d = self.cursor()
|
214
|
+
e = self.cursor()
|
215
|
+
self.db.close()
|
216
|
+
# open a new connection so the tearDown can run
|
217
|
+
self.db = self.connect()
|
218
|
+
self.assertRaises(zxJDBC.ProgrammingError, c.execute, ("select * from zxtesting",))
|
219
|
+
self.assertRaises(zxJDBC.ProgrammingError, d.execute, ("select * from zxtesting",))
|
220
|
+
self.assertRaises(zxJDBC.ProgrammingError, e.execute, ("select * from zxtesting",))
|
221
|
+
|
222
|
+
def testNativeSQL(self):
|
223
|
+
"""testing the connection's ability to convert sql"""
|
224
|
+
sql = self.db.nativesql("select * from zxtesting where id = ?")
|
225
|
+
assert sql is not None
|
226
|
+
assert len(sql) > 0
|
227
|
+
|
228
|
+
def testTables(self):
|
229
|
+
"""testing cursor.tables()"""
|
230
|
+
c = self.cursor()
|
231
|
+
try:
|
232
|
+
c.tables(None, None, None, None)
|
233
|
+
# let's look for zxtesting
|
234
|
+
found = 0
|
235
|
+
while not found:
|
236
|
+
try:
|
237
|
+
found = "zxtesting" == c.next()[2].lower()
|
238
|
+
except StopIteration:
|
239
|
+
break
|
240
|
+
assert found, "expected to find 'zxtesting'"
|
241
|
+
c.tables(None, None, "zxtesting", None)
|
242
|
+
self.assertEquals(1, len(c.fetchall()))
|
243
|
+
c.tables(None, None, "zxtesting", ("TABLE",))
|
244
|
+
self.assertEquals(1, len(c.fetchall()))
|
245
|
+
c.tables(None, None, "zxtesting", ("table",))
|
246
|
+
self.assertEquals(1, len(c.fetchall()))
|
247
|
+
finally:
|
248
|
+
c.close()
|
249
|
+
|
250
|
+
def testColumns(self):
|
251
|
+
"""testing cursor.columns()"""
|
252
|
+
c = self.cursor()
|
253
|
+
try:
|
254
|
+
# deliberately copied so as to produce useful line numbers
|
255
|
+
|
256
|
+
c.columns(None, None, "zxtesting", None)
|
257
|
+
f = c.fetchall()
|
258
|
+
self.assertEquals(3, c.rowcount)
|
259
|
+
f.sort(lambda x, y: cmp(x[3], y[3]))
|
260
|
+
self.assertEquals("name", f[1][3].lower())
|
261
|
+
|
262
|
+
# if the db engine handles mixed case, then don't ask about a different
|
263
|
+
# case because it will fail
|
264
|
+
if not self.db.__connection__.getMetaData().storesMixedCaseIdentifiers():
|
265
|
+
c.columns(None, None, "ZXTESTING", None)
|
266
|
+
f = c.fetchall()
|
267
|
+
self.assertEquals(3, c.rowcount)
|
268
|
+
f.sort(lambda x, y: cmp(x[3], y[3]))
|
269
|
+
self.assertEquals("name", f[1][3].lower())
|
270
|
+
finally:
|
271
|
+
c.close()
|
272
|
+
|
273
|
+
def testBestRow(self):
|
274
|
+
"""testing bestrow which finds the optimal set of columns that uniquely identify a row"""
|
275
|
+
c = self.cursor()
|
276
|
+
try:
|
277
|
+
# we're really just testing that this doesn't blow up
|
278
|
+
c.bestrow(None, None, "zxtesting")
|
279
|
+
f = c.fetchall()
|
280
|
+
if f: # we might as well see that it worked
|
281
|
+
self.assertEquals(1, len(f))
|
282
|
+
finally:
|
283
|
+
c.close()
|
284
|
+
|
285
|
+
def testTypeInfo(self):
|
286
|
+
"""testing cursor.gettypeinfo()"""
|
287
|
+
c = self.cursor()
|
288
|
+
try:
|
289
|
+
c.gettypeinfo()
|
290
|
+
f = c.fetchall()
|
291
|
+
assert f is not None, "expected some type information, got None"
|
292
|
+
# this worked prior to the Fetch re-write, now the client will have to bear the burden, sorry
|
293
|
+
#c.gettypeinfo(zxJDBC.INTEGER)
|
294
|
+
#f = c.fetchall()
|
295
|
+
#assert f[0][1] == zxJDBC.INTEGER, "expected [%d], got [%d]" % (zxJDBC.INTEGER, f[0][1])
|
296
|
+
finally:
|
297
|
+
c.close()
|
298
|
+
|
299
|
+
def _test_scrolling(self, dynamic=0):
|
300
|
+
if self.vendor.scroll:
|
301
|
+
c = self.cursor(dynamic,
|
302
|
+
rstype=getattr(zxJDBC, self.vendor.scroll),
|
303
|
+
rsconcur=zxJDBC.CONCUR_READ_ONLY
|
304
|
+
)
|
305
|
+
else:
|
306
|
+
c = self.cursor(dynamic)
|
307
|
+
|
308
|
+
try:
|
309
|
+
# set everything up
|
310
|
+
c.execute("select id, name, state from zxtesting order by id")
|
311
|
+
self.assertEquals(1, c.fetchone()[0])
|
312
|
+
self.assertEquals(2, c.fetchone()[0])
|
313
|
+
self.assertEquals(3, c.fetchone()[0])
|
314
|
+
# move back two and fetch the row again
|
315
|
+
c.scroll(-2)
|
316
|
+
self.assertEquals(2, c.fetchone()[0])
|
317
|
+
# move to the fifth row (0-based indexing)
|
318
|
+
c.scroll(4, "absolute")
|
319
|
+
self.assertEquals(5, c.fetchone()[0])
|
320
|
+
# move back to the start
|
321
|
+
c.scroll(-5)
|
322
|
+
self.assertEquals(1, c.fetchone()[0])
|
323
|
+
# move to the end
|
324
|
+
c.scroll(6, "absolute")
|
325
|
+
self.assertEquals(7, c.fetchone()[0])
|
326
|
+
# make sure we get an IndexError
|
327
|
+
self.assertRaises(IndexError, c.scroll, 1, "relative")
|
328
|
+
self.assertRaises(IndexError, c.scroll, -1, "absolute")
|
329
|
+
self.assertRaises(zxJDBC.ProgrammingError, c.scroll, 1, "somethingelsealltogether")
|
330
|
+
finally:
|
331
|
+
c.close()
|
332
|
+
|
333
|
+
def testDynamicCursorScrolling(self):
|
334
|
+
"""testing the ability to scroll a dynamic cursor"""
|
335
|
+
self._test_scrolling(1)
|
336
|
+
|
337
|
+
def testStaticCursorScrolling(self):
|
338
|
+
"""testing the ability to scroll a static cursor"""
|
339
|
+
self._test_scrolling(0)
|
340
|
+
|
341
|
+
def _test_rownumber(self, dynamic=0):
|
342
|
+
if self.vendor.scroll:
|
343
|
+
c = self.cursor(dynamic,
|
344
|
+
rstype=getattr(zxJDBC, self.vendor.scroll),
|
345
|
+
rsconcur=zxJDBC.CONCUR_READ_ONLY
|
346
|
+
)
|
347
|
+
else:
|
348
|
+
c = self.cursor(dynamic)
|
349
|
+
|
350
|
+
try:
|
351
|
+
if not dynamic:
|
352
|
+
# a dynamic cursor doesn't know if any rows really exist
|
353
|
+
# maybe the 'possibility' of rows should change .rownumber to 0?
|
354
|
+
c.execute("select * from zxtesting where 1=0")
|
355
|
+
self.assertEquals(0, c.rownumber)
|
356
|
+
c.execute("select * from zxtesting")
|
357
|
+
self.assertEquals(0, c.rownumber)
|
358
|
+
c.next()
|
359
|
+
self.assertEquals(1, c.rownumber)
|
360
|
+
c.next()
|
361
|
+
self.assertEquals(2, c.rownumber)
|
362
|
+
c.scroll(-1)
|
363
|
+
self.assertEquals(1, c.rownumber)
|
364
|
+
c.scroll(2, "absolute")
|
365
|
+
self.assertEquals(2, c.rownumber)
|
366
|
+
c.scroll(6, "absolute")
|
367
|
+
self.assertEquals(6, c.rownumber)
|
368
|
+
finally:
|
369
|
+
c.close()
|
370
|
+
self.assertEquals(None, c.rownumber)
|
371
|
+
|
372
|
+
def testStaticRownumber(self):
|
373
|
+
"""testing a static cursor's rownumber"""
|
374
|
+
self._test_rownumber(0)
|
375
|
+
|
376
|
+
def testDynamicRownumber(self):
|
377
|
+
"""testing a dynamic cursor's rownumber"""
|
378
|
+
self._test_rownumber(1)
|
379
|
+
|
380
|
+
def _test_rowcount(self, dynamic=0):
|
381
|
+
if self.vendor.scroll:
|
382
|
+
c = self.cursor(dynamic,
|
383
|
+
rstype=getattr(zxJDBC, self.vendor.scroll),
|
384
|
+
rsconcur=zxJDBC.CONCUR_READ_ONLY
|
385
|
+
)
|
386
|
+
else:
|
387
|
+
c = self.cursor(dynamic)
|
388
|
+
|
389
|
+
try:
|
390
|
+
c.execute("select * from zxtesting")
|
391
|
+
c.next()
|
392
|
+
c.next()
|
393
|
+
c.next()
|
394
|
+
if dynamic:
|
395
|
+
# dynamic cursors only know about the number of rows encountered
|
396
|
+
self.assertEquals(3, c.rowcount)
|
397
|
+
else:
|
398
|
+
self.assertEquals(7, c.rowcount)
|
399
|
+
c.scroll(-1)
|
400
|
+
# make sure they don't change just because we scrolled backwards
|
401
|
+
if dynamic:
|
402
|
+
# dynamic cursors only know about the number of rows encountered
|
403
|
+
self.assertEquals(3, c.rowcount)
|
404
|
+
else:
|
405
|
+
self.assertEquals(7, c.rowcount)
|
406
|
+
finally:
|
407
|
+
c.close()
|
408
|
+
|
409
|
+
def testStaticRowcount(self):
|
410
|
+
"""testing a static cursor's rowcount"""
|
411
|
+
self._test_rowcount(0)
|
412
|
+
|
413
|
+
def testDynamicRowcount(self):
|
414
|
+
"""testing a dynamic cursor's rowcount"""
|
415
|
+
self._test_rowcount(1)
|
416
|
+
|
417
|
+
def testTableTypeInfo(self):
|
418
|
+
"""testing cursor.gettabletypeinfo()"""
|
419
|
+
c = self.cursor()
|
420
|
+
try:
|
421
|
+
c.gettabletypeinfo()
|
422
|
+
c.fetchall()
|
423
|
+
assert c.rowcount > 0, "expected some table types"
|
424
|
+
finally:
|
425
|
+
c.close()
|
426
|
+
|
427
|
+
def testTupleParams(self):
|
428
|
+
"""testing the different ways to pass params to execute()"""
|
429
|
+
c = self.cursor()
|
430
|
+
try:
|
431
|
+
self.assertRaises(zxJDBC.ProgrammingError, c.execute, "select * from zxtesting where id = ?", params=4)
|
432
|
+
c.execute("select * from zxtesting where id = ?", params=[4])
|
433
|
+
c.execute("select * from zxtesting where id = ?", params=(4,))
|
434
|
+
finally:
|
435
|
+
c.close()
|
436
|
+
|
437
|
+
def testConnectionAttribute(self):
|
438
|
+
"""testing the getting and setting of cursor.connection"""
|
439
|
+
c = self.cursor()
|
440
|
+
try:
|
441
|
+
from com.ziclix.python.sql import PyConnection
|
442
|
+
assert isinstance(c.connection, PyConnection), "expected PyConnection"
|
443
|
+
self.assertRaises(TypeError, setattr, (c, "connection", None), None)
|
444
|
+
finally:
|
445
|
+
c.close()
|
446
|
+
|
447
|
+
def testFetchMany(self):
|
448
|
+
"""testing cursor.fetchmany()"""
|
449
|
+
c = self.cursor()
|
450
|
+
try:
|
451
|
+
c.execute("select * from zxtesting")
|
452
|
+
data = c.fetchmany(6)
|
453
|
+
assert len(data) == 6, "expected [6] rows, got [%d]" % (len(data))
|
454
|
+
c.execute("select * from zxtesting")
|
455
|
+
data = c.fetchmany(16)
|
456
|
+
assert len(data) == 7, "expected [7] rows, got [%d]" % (len(data))
|
457
|
+
finally:
|
458
|
+
c.close()
|
459
|
+
|
460
|
+
def testQueryWithParameter(self):
|
461
|
+
"""testing query by parameter"""
|
462
|
+
c = self.cursor()
|
463
|
+
try:
|
464
|
+
c.execute("select name from zxtesting where state = ?", [("il",)], {0:zxJDBC.VARCHAR})
|
465
|
+
data = c.fetchall()
|
466
|
+
assert len(data) == 2, "expected [2] rows, got [%d]" % (len(data))
|
467
|
+
c.execute("select name from zxtesting where state = ?", [("co",)], {0:zxJDBC.VARCHAR})
|
468
|
+
data = c.fetchall()
|
469
|
+
assert len(data) == 1, "expected [1] row, got [%d]" % (len(data))
|
470
|
+
finally:
|
471
|
+
c.close()
|
472
|
+
|
473
|
+
def testInsertWithFile(self):
|
474
|
+
"""testing insert with file"""
|
475
|
+
assert self.has_table("texttable"), "missing attribute texttable"
|
476
|
+
fp = open(tempfile.mktemp(), "w")
|
477
|
+
c = self.cursor()
|
478
|
+
try:
|
479
|
+
try:
|
480
|
+
c.execute(self.table("texttable")[1])
|
481
|
+
data = fp.name * 300
|
482
|
+
data = data[:3500]
|
483
|
+
fp.write(data)
|
484
|
+
fp.flush()
|
485
|
+
fp.close()
|
486
|
+
fp = open(fp.name, "r")
|
487
|
+
c.execute("insert into %s (a, b) values (?, ?)" % (self.table("texttable")[0]), [(0, fp)], {1:zxJDBC.LONGVARCHAR})
|
488
|
+
self.db.commit()
|
489
|
+
c.execute("select b from %s" % (self.table("texttable")[0]))
|
490
|
+
f = c.fetchall()
|
491
|
+
assert len(f) == 1, "expected [1] row, got [%d]" % (len(f))
|
492
|
+
assert len(f[0][0]) == len(data), "expected [%d], got [%d]" % (len(data), len(f[0][0]))
|
493
|
+
assert data == f[0][0], "failed to retrieve the same text as inserted"
|
494
|
+
except Exception, e:
|
495
|
+
raise e
|
496
|
+
finally:
|
497
|
+
c.execute("drop table %s" % (self.table("texttable")[0]))
|
498
|
+
c.close()
|
499
|
+
self.db.commit()
|
500
|
+
fp.close()
|
501
|
+
os.remove(fp.name)
|
502
|
+
|
503
|
+
def calendar(self):
|
504
|
+
c = Calendar.getInstance()
|
505
|
+
c.setTime(JDate())
|
506
|
+
return c
|
507
|
+
|
508
|
+
def testDate(self):
|
509
|
+
"""testing creation of Date"""
|
510
|
+
|
511
|
+
# Java uses milliseconds and Python uses seconds, so adjust the time accordingly
|
512
|
+
# seeded with Java
|
513
|
+
c = self.calendar()
|
514
|
+
o = zxJDBC.DateFromTicks(c.getTime().getTime() / 1000L)
|
515
|
+
v = zxJDBC.Date(c.get(Calendar.YEAR), c.get(Calendar.MONTH) + 1, c.get(Calendar.DATE))
|
516
|
+
assert o.equals(v), "incorrect date conversion using java, got [%ld], expected [%ld]" % (v.getTime(), o.getTime())
|
517
|
+
|
518
|
+
# seeded with Python
|
519
|
+
t = time.time()
|
520
|
+
l = time.localtime(t)
|
521
|
+
o = zxJDBC.DateFromTicks(t)
|
522
|
+
v = zxJDBC.Date(l[0], l[1], l[2])
|
523
|
+
assert o.equals(v), "incorrect date conversion, got [%ld], expected [%ld]" % (v.getTime(), o.getTime())
|
524
|
+
|
525
|
+
def testTime(self):
|
526
|
+
"""testing creation of Time"""
|
527
|
+
|
528
|
+
# Java uses milliseconds and Python uses seconds, so adjust the time accordingly
|
529
|
+
|
530
|
+
# seeded with Java
|
531
|
+
c = self.calendar()
|
532
|
+
o = zxJDBC.TimeFromTicks(c.getTime().getTime() / 1000L)
|
533
|
+
v = zxJDBC.Time(c.get(Calendar.HOUR), c.get(Calendar.MINUTE), c.get(Calendar.SECOND))
|
534
|
+
assert o.equals(v), "incorrect date conversion using java, got [%ld], expected [%ld]" % (v.getTime(), o.getTime())
|
535
|
+
|
536
|
+
# seeded with Python
|
537
|
+
#t = time.time()
|
538
|
+
#l = time.localtime(t)
|
539
|
+
#o = zxJDBC.TimeFromTicks(t)
|
540
|
+
#v = zxJDBC.Time(l[3], l[4], l[5])
|
541
|
+
#assert o.equals(v), "incorrect date conversion using python, got [%ld], expected [%ld]" % (v.getTime(), o.getTime())
|
542
|
+
|
543
|
+
def testTimestamp(self):
|
544
|
+
"""testing creation of Timestamp"""
|
545
|
+
|
546
|
+
# Java uses milliseconds and Python uses seconds, so adjust the time accordingly
|
547
|
+
|
548
|
+
# seeded with Java
|
549
|
+
c = self.calendar()
|
550
|
+
o = zxJDBC.TimestampFromTicks(c.getTime().getTime() / 1000L)
|
551
|
+
v = zxJDBC.Timestamp(c.get(Calendar.YEAR), c.get(Calendar.MONTH) + 1, c.get(Calendar.DATE),
|
552
|
+
c.get(Calendar.HOUR), c.get(Calendar.MINUTE), c.get(Calendar.SECOND))
|
553
|
+
assert o.equals(v), "incorrect date conversion using java, got [%ld], expected [%ld]" % (v.getTime(), o.getTime())
|
554
|
+
|
555
|
+
# seeded with Python
|
556
|
+
#t = time.time()
|
557
|
+
#l = time.localtime(t)
|
558
|
+
#o = zxJDBC.TimestampFromTicks(t)
|
559
|
+
#v = zxJDBC.Timestamp(l[0], l[1], l[2], l[3], l[4], l[5])
|
560
|
+
#assert o.equals(v), "incorrect date conversion using python, got [%ld], expected [%ld]" % (v.getTime(), o.getTime())
|
561
|
+
|
562
|
+
def _test_precision(self, (tabname, sql), diff, values, attr):
|
563
|
+
|
564
|
+
try:
|
565
|
+
c = self.cursor()
|
566
|
+
try:
|
567
|
+
c.execute("drop table %s" % (tabname))
|
568
|
+
self.db.commit()
|
569
|
+
except:
|
570
|
+
self.db.rollback()
|
571
|
+
finally:
|
572
|
+
c.close()
|
573
|
+
|
574
|
+
try:
|
575
|
+
c = self.cursor()
|
576
|
+
c.execute(sql)
|
577
|
+
c.execute("insert into %s (a, b) values (?, ?)" % (tabname), map(lambda x: (0, x), values))
|
578
|
+
c.execute("select a, b from %s" % (tabname))
|
579
|
+
f = c.fetchall()
|
580
|
+
assert len(values) == len(f), "mismatched result set length"
|
581
|
+
for i in range(0, len(f)):
|
582
|
+
v = values[i]
|
583
|
+
if attr: v = getattr(v, attr)()
|
584
|
+
msg = "expected [%0.10f], got [%0.10f] for index [%d] of [%d]" % (v, f[i][1], (i+1), len(f))
|
585
|
+
assert diff(f[i][1], values[i]) < 0.01, msg
|
586
|
+
self.db.commit()
|
587
|
+
finally:
|
588
|
+
c.close()
|
589
|
+
try:
|
590
|
+
c = self.cursor()
|
591
|
+
try:
|
592
|
+
c.execute("drop table %s" % (tabname))
|
593
|
+
self.db.commit()
|
594
|
+
except:
|
595
|
+
self.db.rollback()
|
596
|
+
finally:
|
597
|
+
c.close()
|
598
|
+
|
599
|
+
def testFloat(self):
|
600
|
+
"""testing value of float"""
|
601
|
+
assert self.has_table("floattable"), "missing attribute floattable"
|
602
|
+
values = [4.22, 123.44, 292.09, 33.2, 102.00, 445]
|
603
|
+
self._test_precision(self.table("floattable"), lambda x, y: x-y, values, None)
|
604
|
+
|
605
|
+
def testBigDecimal(self):
|
606
|
+
"""testing value of BigDecimal"""
|
607
|
+
assert self.has_table("floattable"), "missing attribute floattable"
|
608
|
+
from java.math import BigDecimal
|
609
|
+
values = [BigDecimal(x).setScale(2, BigDecimal.ROUND_UP) for x in [4.22, 123.44, 292.09, 33.2, 102.00, 445]]
|
610
|
+
self._test_precision(self.table("floattable"), lambda x, y, b=BigDecimal: b(x).subtract(y).doubleValue(), values, "doubleValue")
|
611
|
+
|
612
|
+
def testBigDecimalConvertedToDouble(self):
|
613
|
+
"""testing value of BigDecimal when converted to double"""
|
614
|
+
assert self.has_table("floattable"), "missing attribute floattable"
|
615
|
+
from java.math import BigDecimal
|
616
|
+
values = [BigDecimal(x).setScale(2, BigDecimal.ROUND_UP) for x in [4.22, 123.44, 292.09, 33.2, 102.00, 445]]
|
617
|
+
self._test_precision(self.table("floattable"), lambda x, y: x - y.doubleValue(), values, "doubleValue")
|
618
|
+
|
619
|
+
def testNextset(self):
|
620
|
+
"""testing nextset"""
|
621
|
+
c = self.cursor()
|
622
|
+
try:
|
623
|
+
c.execute("select * from zxtesting where id = ?", [(3,), (4,)])
|
624
|
+
f = c.fetchall()
|
625
|
+
assert f, "expected results, got None"
|
626
|
+
assert len(f) == 1, "expected [1], got [%d]" % (len(f))
|
627
|
+
assert c.nextset(), "expected next set, got None"
|
628
|
+
f = c.fetchall()
|
629
|
+
assert f, "expected results after call to nextset(), got None"
|
630
|
+
assert len(f) == 1, "expected [1], got [%d]" % (len(f))
|
631
|
+
finally:
|
632
|
+
c.close()
|
633
|
+
|
634
|
+
def testJavaUtilList(self):
|
635
|
+
"""testing parameterized values in a java.util.List"""
|
636
|
+
c = self.cursor()
|
637
|
+
try:
|
638
|
+
from java.util import LinkedList
|
639
|
+
a = LinkedList()
|
640
|
+
a.add((3,))
|
641
|
+
c.execute("select * from zxtesting where id = ?", a)
|
642
|
+
f = c.fetchall()
|
643
|
+
assert len(f) == 1, "expected [1], got [%d]" % (len(f))
|
644
|
+
finally:
|
645
|
+
c.close()
|
646
|
+
|
647
|
+
def testUpdateCount(self):
|
648
|
+
"""testing update count functionality"""
|
649
|
+
c = self.cursor()
|
650
|
+
try:
|
651
|
+
c.execute("insert into zxtesting values (?, ?, ?)", [(500, 'bz', 'or')])
|
652
|
+
assert c.updatecount == 1, "expected [1], got [%d]" % (c.updatecount)
|
653
|
+
c.execute("select * from zxtesting")
|
654
|
+
self.assertEquals(None, c.updatecount)
|
655
|
+
# there's a *feature* in the mysql engine where it returns 0 for delete if there is no
|
656
|
+
# where clause, regardless of the actual value. using a where clause forces it to calculate
|
657
|
+
# the appropriate value
|
658
|
+
c.execute("delete from zxtesting where 1>0")
|
659
|
+
assert c.updatecount == 8, "expected [8], got [%d]" % (c.updatecount)
|
660
|
+
c.execute("update zxtesting set name = 'nothing'")
|
661
|
+
self.assertEquals(0, c.updatecount)
|
662
|
+
finally:
|
663
|
+
c.close()
|
664
|
+
|
665
|
+
def _test_time(self, (tabname, sql), factory, values, _type, _cmp=cmp, datahandler=None):
|
666
|
+
c = self.cursor()
|
667
|
+
if datahandler: c.datahandler = datahandler(c.datahandler)
|
668
|
+
try:
|
669
|
+
c.execute(sql)
|
670
|
+
dates = map(lambda x, f=factory: apply(f, x), values)
|
671
|
+
for a in dates:
|
672
|
+
c.execute("insert into %s values (1, ?)" % (tabname), [(a,)], {0:_type})
|
673
|
+
self.db.commit()
|
674
|
+
|
675
|
+
c.execute("select * from %s where b = ?" % (tabname), [(dates[0],)], {0:_type})
|
676
|
+
f = c.fetchall()
|
677
|
+
assert len(f) == 1, "expected length [1], got [%d]" % (len(f))
|
678
|
+
assert _cmp(f[0][1], dates[0]) == 0, "expected date [%s], got [%s]" % (str(dates[0]), str(f[0][1]))
|
679
|
+
|
680
|
+
c.execute("delete from %s where b = ?" % (tabname), [(dates[1],)], {0:_type})
|
681
|
+
self.db.commit()
|
682
|
+
|
683
|
+
c.execute("select * from %s" % (tabname))
|
684
|
+
f = c.fetchall()
|
685
|
+
self.assertEquals(len(f), len(dates) - 1)
|
686
|
+
finally:
|
687
|
+
c.execute("drop table %s" % (tabname))
|
688
|
+
c.close()
|
689
|
+
self.db.commit()
|
690
|
+
|
691
|
+
def testUpdateSelectByDate(self):
|
692
|
+
"""testing insert, update, query and delete by java.sql.Date"""
|
693
|
+
assert self.has_table("datetable"), "missing attribute datetable"
|
694
|
+
def _cmp_(x, y):
|
695
|
+
xt = (x.getYear(), x.getMonth(), x.getDay())
|
696
|
+
yt = (y.getYear(), y.getMonth(), y.getDay())
|
697
|
+
return not xt == yt
|
698
|
+
values = [(1996, 6, 22), (2000, 11, 12), (2000, 1, 12), (1999, 9, 24)]
|
699
|
+
self._test_time(self.table("datetable"), zxJDBC.Date, values, zxJDBC.DATE, _cmp_)
|
700
|
+
|
701
|
+
def testUpdateSelectByTime(self):
|
702
|
+
"""testing insert, update, query and delete by java.sql.Time"""
|
703
|
+
assert self.has_table("timetable"), "missing attribute timetable"
|
704
|
+
def _cmp_(x, y):
|
705
|
+
xt = (x.getHours(), x.getMinutes(), x.getSeconds())
|
706
|
+
yt = (y.getHours(), y.getMinutes(), y.getSeconds())
|
707
|
+
return not xt == yt
|
708
|
+
values = [(10, 11, 12), (3, 1, 12), (22, 9, 24)]
|
709
|
+
self._test_time(self.table("timetable"), zxJDBC.Time, values, zxJDBC.TIME, _cmp_)
|
710
|
+
|
711
|
+
def testUpdateSelectByTimestamp(self):
|
712
|
+
"""testing insert, update, query and delete by java.sql.Timestamp"""
|
713
|
+
assert self.has_table("timestamptable"), "missing attribute timestamptable"
|
714
|
+
def _cmp_(x, y):
|
715
|
+
xt = (x.getYear(), x.getMonth(), x.getDay(), x.getHours(), x.getMinutes(), x.getSeconds())
|
716
|
+
yt = (y.getYear(), y.getMonth(), y.getDay(), y.getHours(), y.getMinutes(), y.getSeconds())
|
717
|
+
return not xt == yt
|
718
|
+
values = [(1996, 6, 22, 10, 11, 12), (2000, 11, 12, 3, 1, 12), (2001, 1, 12, 4, 9, 24)]
|
719
|
+
self._test_time(self.table("timestamptable"), zxJDBC.Timestamp, values, zxJDBC.TIMESTAMP, _cmp_)
|
720
|
+
|
721
|
+
def testOrderOfArgsMaxRowsOnly(self):
|
722
|
+
"""testing execute with max rows only"""
|
723
|
+
c = self.cursor()
|
724
|
+
try:
|
725
|
+
|
726
|
+
# maxrows only (SAPDB doesn't support maxrows as of version 7.2.0)
|
727
|
+
c.execute("select * from zxtesting", maxrows=3)
|
728
|
+
f = c.fetchall()
|
729
|
+
assert len(f) == 3, "expected length [3], got [%d]" % (len(f))
|
730
|
+
|
731
|
+
finally:
|
732
|
+
c.close()
|
733
|
+
self.db.commit()
|
734
|
+
|
735
|
+
def testOrderOfArgs(self):
|
736
|
+
"""testing execute with different argument orderings"""
|
737
|
+
c = self.cursor()
|
738
|
+
try:
|
739
|
+
|
740
|
+
# bindings and params flipped
|
741
|
+
c.execute("select * from zxtesting where id = ?", bindings={0:zxJDBC.INTEGER}, params=[(3,)])
|
742
|
+
f = c.fetchall()
|
743
|
+
assert len(f) == 1, "expected length [1], got [%d]" % (len(f))
|
744
|
+
|
745
|
+
# bindings and params flipped, empty params
|
746
|
+
c.execute("select * from zxtesting where id = ?", bindings={}, params=[(3,)])
|
747
|
+
f = c.fetchall()
|
748
|
+
assert len(f) == 1, "expected length [1], got [%d]" % (len(f))
|
749
|
+
|
750
|
+
# bindings and params flipped, empty params, empty bindings
|
751
|
+
c.execute("select * from zxtesting where id = 3", bindings={}, params=[])
|
752
|
+
f = c.fetchall()
|
753
|
+
assert len(f) == 1, "expected length [1], got [%d]" % (len(f))
|
754
|
+
|
755
|
+
finally:
|
756
|
+
c.close()
|
757
|
+
self.db.commit()
|
758
|
+
|
759
|
+
def testMaxrows(self):
|
760
|
+
"""testing maxrows"""
|
761
|
+
c = self.cursor()
|
762
|
+
try:
|
763
|
+
|
764
|
+
c.execute("select * from zxtesting", maxrows=3)
|
765
|
+
self.assertEquals(3, len(c.fetchall()))
|
766
|
+
|
767
|
+
c.execute("select * from zxtesting where id > ?", (1,), maxrows=3)
|
768
|
+
self.assertEquals(3, len(c.fetchall()))
|
769
|
+
|
770
|
+
c.execute("select count(*) from zxtesting")
|
771
|
+
f = c.fetchall()
|
772
|
+
num = f[0][0]
|
773
|
+
|
774
|
+
c.execute("select * from zxtesting", maxrows=0)
|
775
|
+
self.assertEquals(num, len(c.fetchall()))
|
776
|
+
|
777
|
+
finally:
|
778
|
+
c.close()
|
779
|
+
self.db.commit()
|
780
|
+
|
781
|
+
def testPrimaryKey(self):
|
782
|
+
"""testing for primary key information"""
|
783
|
+
c = self.cursor()
|
784
|
+
try:
|
785
|
+
c.primarykeys(None, None, "zxtesting")
|
786
|
+
f = c.fetchall()
|
787
|
+
assert len(f) == 1, "expected [1], got [%d]" % (len(f))
|
788
|
+
assert f[0][3].lower() == "id", "expected [id], got [%s]" % (f[0][3])
|
789
|
+
finally:
|
790
|
+
c.close()
|
791
|
+
self.db.commit()
|
792
|
+
|
793
|
+
def testForeignKey(self):
|
794
|
+
"""testing for foreign key information"""
|
795
|
+
pass
|
796
|
+
|
797
|
+
def testIndexInfo(self):
|
798
|
+
"""testing index information"""
|
799
|
+
c = self.cursor()
|
800
|
+
try:
|
801
|
+
c.statistics(None, None, "zxtesting", 0, 0)
|
802
|
+
f = c.fetchall()
|
803
|
+
assert f is not None, "expected some values"
|
804
|
+
# filter out any indicies with name None
|
805
|
+
f = filter(lambda x: x[5], f)
|
806
|
+
assert len(f) == 1, "expected [1], got [%d]" % (len(f))
|
807
|
+
finally:
|
808
|
+
c.close()
|
809
|
+
|
810
|
+
def _test_fetching(self, dynamic=0):
|
811
|
+
c = self.cursor(dynamic)
|
812
|
+
try:
|
813
|
+
# make sure None if the result is an empty result set
|
814
|
+
c.execute("select * from zxtesting where 1<0")
|
815
|
+
self.assertEquals(None, c.fetchone())
|
816
|
+
# make sure an empty sequence if the result is an empty result set
|
817
|
+
c.execute("select * from zxtesting where 1<0")
|
818
|
+
self.assertEquals([], c.fetchmany())
|
819
|
+
# make sure an empty sequence if the result is an empty result set
|
820
|
+
c.execute("select * from zxtesting where 1<0")
|
821
|
+
self.assertEquals([], c.fetchall())
|
822
|
+
# test some arraysize features
|
823
|
+
c.execute("select * from zxtesting")
|
824
|
+
f = c.fetchmany()
|
825
|
+
assert len(f) == c.arraysize, "expecting [%d] rows, got [%d]" % (c.arraysize, len(f))
|
826
|
+
c.execute("select * from zxtesting")
|
827
|
+
c.arraysize = 4
|
828
|
+
f = c.fetchmany()
|
829
|
+
assert len(f) == 4, "expecting [4] rows, got [%d]" % (len(f))
|
830
|
+
c.execute("select * from zxtesting")
|
831
|
+
c.arraysize = -1
|
832
|
+
f = c.fetchmany()
|
833
|
+
assert len(f) == 7, "expecting [7] rows, got [%d]" % (len(f))
|
834
|
+
finally:
|
835
|
+
c.close()
|
836
|
+
|
837
|
+
def testStaticFetching(self):
|
838
|
+
"""testing various static fetch methods"""
|
839
|
+
self._test_fetching(0)
|
840
|
+
|
841
|
+
def testDynamicFetching(self):
|
842
|
+
"""testing various dynamic fetch methods"""
|
843
|
+
self._test_fetching(1)
|
844
|
+
|
845
|
+
def testFetchingBeforeExecute(self):
|
846
|
+
"""testing fetch methods before execution"""
|
847
|
+
c = self.cursor()
|
848
|
+
try:
|
849
|
+
try:
|
850
|
+
c.fetchall()
|
851
|
+
except zxJDBC.Error, e:
|
852
|
+
pass
|
853
|
+
else:
|
854
|
+
self.fail("excepted exception calling fetchall() prior to execute()")
|
855
|
+
finally:
|
856
|
+
c.close()
|
857
|
+
|
858
|
+
def testBindingsWithNoParams(self):
|
859
|
+
"""testing bindings with no params"""
|
860
|
+
c = self.cursor()
|
861
|
+
try:
|
862
|
+
self.assertRaises(zxJDBC.ProgrammingError, c.execute, "select * from zxtesting", {0:zxJDBC.INTEGER})
|
863
|
+
|
864
|
+
# test an inappropriate value for a binding
|
865
|
+
self.assertRaises(zxJDBC.ProgrammingError, c.execute, "select * from zxtesting", {0:{}})
|
866
|
+
finally:
|
867
|
+
c.close()
|
868
|
+
|
869
|
+
def testDynamicCursor(self):
|
870
|
+
"""testing dynamic cursor queries"""
|
871
|
+
c = self.cursor(1)
|
872
|
+
try:
|
873
|
+
c.execute("select * from zxtesting")
|
874
|
+
f = c.fetchmany(4)
|
875
|
+
assert len(f) == 4, "expected [4] rows, got [%d]" % (len(f))
|
876
|
+
finally:
|
877
|
+
c.close()
|
878
|
+
|
879
|
+
def testRowid(self):
|
880
|
+
"""testing the autoincrement facilities of the different handlers"""
|
881
|
+
assert self.has_table("autoincrementtable"), "no autoincrement table"
|
882
|
+
|
883
|
+
c = self.cursor()
|
884
|
+
assert c.lastrowid == None, "expected initial lastrowid to be None"
|
885
|
+
|
886
|
+
try:
|
887
|
+
|
888
|
+
tabname, sql = self.table("autoincrementtable")
|
889
|
+
c.execute(sql)
|
890
|
+
|
891
|
+
c.execute("insert into %s (b) values (?)" % (tabname), [(0,)])
|
892
|
+
assert c.lastrowid is not None, "lastrowid is None"
|
893
|
+
|
894
|
+
try:
|
895
|
+
for idx in range(c.lastrowid + 1, c.lastrowid + 25):
|
896
|
+
c.execute("insert into %s (b) values (?)" % (tabname), [(idx,)])
|
897
|
+
assert c.lastrowid is not None, "lastrowid is None"
|
898
|
+
self.assertEquals(idx, c.lastrowid)
|
899
|
+
except:
|
900
|
+
self.db.rollback()
|
901
|
+
|
902
|
+
finally:
|
903
|
+
if self.has_table("post_autoincrementtable"):
|
904
|
+
try:
|
905
|
+
sequence, sql = self.table("post_autoincrementtable")
|
906
|
+
c.execute(sql)
|
907
|
+
self.db.commit()
|
908
|
+
except:
|
909
|
+
self.db.rollback()
|
910
|
+
|
911
|
+
try:
|
912
|
+
c.execute("drop table %s" % (tabname))
|
913
|
+
self.db.commit()
|
914
|
+
except:
|
915
|
+
self.db.rollback()
|
916
|
+
|
917
|
+
self.db.commit()
|
918
|
+
c.close()
|
919
|
+
|
920
|
+
def _test_fetchapi(self, dynamic=0):
|
921
|
+
"""Test the public Java API for Fetch"""
|
922
|
+
from com.ziclix.python.sql import Fetch, WarningListener
|
923
|
+
cur = self.cursor()
|
924
|
+
try:
|
925
|
+
c = self.db.__connection__
|
926
|
+
stmt = c.prepareStatement("select * from zxtesting where id < ?")
|
927
|
+
stmt.setInt(1, 5)
|
928
|
+
rs = stmt.executeQuery()
|
929
|
+
fetch = Fetch.newFetch(cur.datahandler, dynamic)
|
930
|
+
class WL(WarningListener):
|
931
|
+
def warning(self, event):
|
932
|
+
raise event.getWarning()
|
933
|
+
wl = WL()
|
934
|
+
fetch.addWarningListener(wl)
|
935
|
+
# the RS is closed by Fetch
|
936
|
+
fetch.add(rs)
|
937
|
+
|
938
|
+
if not dynamic:
|
939
|
+
self.assertEquals(4, fetch.getRowCount())
|
940
|
+
assert fetch.fetchone()
|
941
|
+
assert fetch.fetchmany(2)
|
942
|
+
assert fetch.fetchall()
|
943
|
+
assert not fetch.fetchall()
|
944
|
+
self.assertEquals(4, fetch.getRowCount())
|
945
|
+
assert fetch.removeWarningListener(wl)
|
946
|
+
fetch.close()
|
947
|
+
stmt.close()
|
948
|
+
finally:
|
949
|
+
cur.close()
|
950
|
+
|
951
|
+
def testStaticFetchAPI(self):
|
952
|
+
"""Test static Java Fetch API"""
|
953
|
+
self._test_fetchapi(0)
|
954
|
+
|
955
|
+
def testDynamicFetchAPI(self):
|
956
|
+
"""Test dynamic Java Fetch API"""
|
957
|
+
self._test_fetchapi(1)
|
958
|
+
|
959
|
+
class LOBTestCase(zxJDBCTestCase):
|
960
|
+
|
961
|
+
def _test_blob(self, obj=0):
|
962
|
+
assert self.has_table("blobtable"), "no blob table"
|
963
|
+
tabname, sql = self.table("blobtable")
|
964
|
+
fn = tempfile.mktemp()
|
965
|
+
fp = None
|
966
|
+
|
967
|
+
c = self.cursor()
|
968
|
+
try:
|
969
|
+
|
970
|
+
hello = ("hello",) * 1024
|
971
|
+
|
972
|
+
c.execute(sql)
|
973
|
+
self.db.commit()
|
974
|
+
|
975
|
+
from java.io import FileOutputStream, FileInputStream, ObjectOutputStream, ObjectInputStream, ByteArrayInputStream
|
976
|
+
|
977
|
+
fp = FileOutputStream(fn)
|
978
|
+
oos = ObjectOutputStream(fp)
|
979
|
+
oos.writeObject(hello)
|
980
|
+
fp.close()
|
981
|
+
|
982
|
+
fp = FileInputStream(fn)
|
983
|
+
blob = ObjectInputStream(fp)
|
984
|
+
value = blob.readObject()
|
985
|
+
fp.close()
|
986
|
+
assert hello == value, "unable to serialize properly"
|
987
|
+
|
988
|
+
if obj == 1:
|
989
|
+
fp = open(fn, "rb")
|
990
|
+
else:
|
991
|
+
fp = FileInputStream(fn)
|
992
|
+
|
993
|
+
c.execute("insert into %s (a, b) values (?, ?)" % (tabname), [(0, fp)], {1:zxJDBC.BLOB})
|
994
|
+
self.db.commit()
|
995
|
+
|
996
|
+
c.execute("select * from %s" % (tabname))
|
997
|
+
f = c.fetchall()
|
998
|
+
bytes = f[0][1]
|
999
|
+
blob = ObjectInputStream(ByteArrayInputStream(bytes)).readObject()
|
1000
|
+
|
1001
|
+
assert hello == blob, "blobs are not equal"
|
1002
|
+
|
1003
|
+
finally:
|
1004
|
+
c.execute("drop table %s" % (tabname))
|
1005
|
+
c.close()
|
1006
|
+
self.db.commit()
|
1007
|
+
if os.path.exists(fn):
|
1008
|
+
if fp:
|
1009
|
+
fp.close()
|
1010
|
+
os.remove(fn)
|
1011
|
+
|
1012
|
+
def testBLOBAsString(self):
|
1013
|
+
"""testing BLOB as string"""
|
1014
|
+
self._test_blob()
|
1015
|
+
|
1016
|
+
def testBLOBAsPyFile(self):
|
1017
|
+
"""testing BLOB as PyFile"""
|
1018
|
+
self._test_blob(1)
|
1019
|
+
|
1020
|
+
def _test_clob(self, asfile=0):
|
1021
|
+
assert self.has_table("clobtable"), "no clob table"
|
1022
|
+
tabname, sql = self.table("clobtable")
|
1023
|
+
|
1024
|
+
c = self.cursor()
|
1025
|
+
try:
|
1026
|
+
hello = "hello" * 1024 * 10
|
1027
|
+
|
1028
|
+
c.execute(sql)
|
1029
|
+
self.db.commit()
|
1030
|
+
|
1031
|
+
if asfile:
|
1032
|
+
fp = open(tempfile.mktemp(), "w")
|
1033
|
+
fp.write(hello)
|
1034
|
+
fp.flush()
|
1035
|
+
fp.close()
|
1036
|
+
obj = open(fp.name, "r")
|
1037
|
+
else:
|
1038
|
+
obj = hello
|
1039
|
+
|
1040
|
+
c.execute("insert into %s (a, b) values (?, ?)" % (tabname), [(0, obj)], {1:zxJDBC.CLOB})
|
1041
|
+
c.execute("select * from %s" % (tabname), maxrows=1)
|
1042
|
+
f = c.fetchall()
|
1043
|
+
assert len(f) == 1, "expected [%d], got [%d]" % (1, len(f))
|
1044
|
+
assert hello == f[0][1], "clobs are not equal"
|
1045
|
+
|
1046
|
+
finally:
|
1047
|
+
c.execute("drop table %s" % (tabname))
|
1048
|
+
c.close()
|
1049
|
+
self.db.commit()
|
1050
|
+
if asfile:
|
1051
|
+
obj.close()
|
1052
|
+
os.remove(obj.name)
|
1053
|
+
|
1054
|
+
def testCLOBAsString(self):
|
1055
|
+
"""testing CLOB as string"""
|
1056
|
+
self._test_clob(0)
|
1057
|
+
|
1058
|
+
def testCLOBAsPyFile(self):
|
1059
|
+
"""testing CLOB as PyFile"""
|
1060
|
+
self._test_clob(1)
|
1061
|
+
|
1062
|
+
class BCPTestCase(zxJDBCTestCase):
|
1063
|
+
|
1064
|
+
def testCSVPipe(self):
|
1065
|
+
"""testing the CSV pipe"""
|
1066
|
+
from java.io import PrintWriter, FileWriter
|
1067
|
+
from com.ziclix.python.sql.pipe import Pipe
|
1068
|
+
from com.ziclix.python.sql.pipe.db import DBSource
|
1069
|
+
from com.ziclix.python.sql.pipe.csv import CSVSink
|
1070
|
+
|
1071
|
+
try:
|
1072
|
+
src = self.connect()
|
1073
|
+
fn = tempfile.mktemp(suffix="csv")
|
1074
|
+
writer = PrintWriter(FileWriter(fn))
|
1075
|
+
csvSink = CSVSink(writer)
|
1076
|
+
|
1077
|
+
c = self.cursor()
|
1078
|
+
try:
|
1079
|
+
c.execute("insert into zxtesting (id, name, state) values (?, ?, ?)", [(1000, 'this,has,a,comma', 'and a " quote')])
|
1080
|
+
c.execute("insert into zxtesting (id, name, state) values (?, ?, ?)", [(1001, 'this,has,a,comma and a "', 'and a " quote')])
|
1081
|
+
# ORACLE has a problem calling stmt.setObject(index, null)
|
1082
|
+
c.execute("insert into zxtesting (id, name, state) values (?, ?, ?)", [(1010, '"this,has,a,comma"', None)], {2:zxJDBC.VARCHAR})
|
1083
|
+
self.db.commit()
|
1084
|
+
finally:
|
1085
|
+
self.db.rollback()
|
1086
|
+
c.close()
|
1087
|
+
|
1088
|
+
dbSource = DBSource(src, c.datahandler.__class__, "zxtesting", None, None, None)
|
1089
|
+
|
1090
|
+
cnt = Pipe().pipe(dbSource, csvSink) - 1 # ignore the header row
|
1091
|
+
|
1092
|
+
finally:
|
1093
|
+
writer.close()
|
1094
|
+
src.close()
|
1095
|
+
os.remove(fn)
|
1096
|
+
|
1097
|
+
def testDBPipe(self):
|
1098
|
+
"""testing the DB pipe"""
|
1099
|
+
from com.ziclix.python.sql.pipe import Pipe
|
1100
|
+
from com.ziclix.python.sql.pipe.db import DBSource, DBSink
|
1101
|
+
|
1102
|
+
try:
|
1103
|
+
src = self.connect()
|
1104
|
+
dst = self.connect()
|
1105
|
+
|
1106
|
+
c = self.cursor()
|
1107
|
+
c.execute("create table zxtestingbcp (id int not null, name varchar(20), state varchar(2), primary key (id))")
|
1108
|
+
self.db.commit()
|
1109
|
+
|
1110
|
+
c.execute("select count(*) from zxtesting")
|
1111
|
+
one = c.fetchone()[0]
|
1112
|
+
c.close()
|
1113
|
+
|
1114
|
+
dbSource = DBSource(src, c.datahandler.__class__, "zxtesting", None, None, None)
|
1115
|
+
dbSink = DBSink(dst, c.datahandler.__class__, "zxtestingbcp", None, None, 1)
|
1116
|
+
|
1117
|
+
cnt = Pipe().pipe(dbSource, dbSink) - 1 # ignore the header row
|
1118
|
+
|
1119
|
+
c = self.cursor()
|
1120
|
+
c.execute("select count(*) from zxtestingbcp")
|
1121
|
+
two = c.fetchone()[0]
|
1122
|
+
c.execute("delete from zxtestingbcp")
|
1123
|
+
self.db.commit()
|
1124
|
+
c.close()
|
1125
|
+
|
1126
|
+
assert one == two, "expected [%d] rows in destination, got [%d] (sql)" % (one, two)
|
1127
|
+
assert one == cnt, "expected [%d] rows in destination, got [%d] (bcp)" % (one, cnt)
|
1128
|
+
|
1129
|
+
# this tests the internal assert in BCP. we need to handle the case where we exclude
|
1130
|
+
# all the rows queried (based on the fact no columns exist) but rows were fetched
|
1131
|
+
# also make sure (eg, Oracle) that the column name case is ignored
|
1132
|
+
dbSource = DBSource(src, c.datahandler.__class__, "zxtesting", None, ["id"], None)
|
1133
|
+
dbSink = DBSink(dst, c.datahandler.__class__, "zxtestingbcp", ["id"], None, 1)
|
1134
|
+
|
1135
|
+
self.assertRaises(zxJDBC.Error, Pipe().pipe, dbSource, dbSink)
|
1136
|
+
|
1137
|
+
params = [(4,)]
|
1138
|
+
|
1139
|
+
dbSource = DBSource(src, c.datahandler.__class__, "zxtesting", "id > ?", None, params)
|
1140
|
+
dbSink = DBSink(dst, c.datahandler.__class__, "zxtestingbcp", None, None, 1)
|
1141
|
+
|
1142
|
+
cnt = Pipe().pipe(dbSource, dbSink) - 1 # ignore the header row
|
1143
|
+
|
1144
|
+
c = self.cursor()
|
1145
|
+
c.execute("select count(*) from zxtesting where id > ?", params)
|
1146
|
+
one = c.fetchone()[0]
|
1147
|
+
c.execute("select count(*) from zxtestingbcp")
|
1148
|
+
two = c.fetchone()[0]
|
1149
|
+
c.close()
|
1150
|
+
assert one == two, "expected [%d] rows in destination, got [%d] (sql)" % (one, two)
|
1151
|
+
assert one == cnt, "expected [%d] rows in destination, got [%d] (bcp)" % (one, cnt)
|
1152
|
+
|
1153
|
+
finally:
|
1154
|
+
try:
|
1155
|
+
c = self.cursor()
|
1156
|
+
try:
|
1157
|
+
c.execute("drop table zxtestingbcp")
|
1158
|
+
self.db.commit()
|
1159
|
+
except:
|
1160
|
+
self.db.rollback()
|
1161
|
+
finally:
|
1162
|
+
c.close()
|
1163
|
+
|
1164
|
+
try:
|
1165
|
+
src.close()
|
1166
|
+
except:
|
1167
|
+
src = None
|
1168
|
+
try:
|
1169
|
+
dst.close()
|
1170
|
+
except:
|
1171
|
+
dst = None
|
1172
|
+
|
1173
|
+
def testBCP(self):
|
1174
|
+
"""testing bcp parameters and functionality"""
|
1175
|
+
from com.ziclix.python.sql.util import BCP
|
1176
|
+
|
1177
|
+
import dbexts
|
1178
|
+
|
1179
|
+
try:
|
1180
|
+
src = self.connect()
|
1181
|
+
dst = self.connect()
|
1182
|
+
|
1183
|
+
c = self.cursor()
|
1184
|
+
c.execute("create table zxtestingbcp (id int not null, name varchar(20), state varchar(2), primary key (id))")
|
1185
|
+
self.db.commit()
|
1186
|
+
|
1187
|
+
c.execute("select count(*) from zxtesting")
|
1188
|
+
one = c.fetchone()[0]
|
1189
|
+
c.close()
|
1190
|
+
|
1191
|
+
b = BCP(src, dst)
|
1192
|
+
if hasattr(self, "datahandler"):
|
1193
|
+
b.sourceDataHandler = self.datahandler
|
1194
|
+
b.destinationDataHandler = self.datahandler
|
1195
|
+
cnt = b.bcp("zxtesting", toTable="zxtestingbcp")
|
1196
|
+
|
1197
|
+
c = self.cursor()
|
1198
|
+
c.execute("select count(*) from zxtestingbcp")
|
1199
|
+
two = c.fetchone()[0]
|
1200
|
+
c.execute("delete from zxtestingbcp")
|
1201
|
+
self.db.commit()
|
1202
|
+
c.close()
|
1203
|
+
|
1204
|
+
assert one == two, "expected [%d] rows in destination, got [%d] (sql)" % (one, two)
|
1205
|
+
assert one == cnt, "expected [%d] rows in destination, got [%d] (bcp)" % (one, cnt)
|
1206
|
+
|
1207
|
+
# this tests the internal assert in BCP. we need to handle the case where we exclude
|
1208
|
+
# all the rows queried (based on the fact no columns exist) but rows were fetched
|
1209
|
+
# also make sure (eg, Oracle) that the column name case is ignored
|
1210
|
+
self.assertRaises(zxJDBC.Error, b.bcp, "zxtesting", toTable="zxtestingbcp", include=["id"], exclude=["id"])
|
1211
|
+
|
1212
|
+
params = [(4,)]
|
1213
|
+
cnt = b.bcp("zxtesting", "id > ?", params, toTable="zxtestingbcp")
|
1214
|
+
|
1215
|
+
c = self.cursor()
|
1216
|
+
c.execute("select count(*) from zxtesting where id > ?", params)
|
1217
|
+
one = c.fetchone()[0]
|
1218
|
+
c.execute("select count(*) from zxtestingbcp")
|
1219
|
+
two = c.fetchone()[0]
|
1220
|
+
c.close()
|
1221
|
+
assert one == two, "expected [%d] rows in destination, got [%d] (sql)" % (one, two)
|
1222
|
+
assert one == cnt, "expected [%d] rows in destination, got [%d] (bcp)" % (one, cnt)
|
1223
|
+
|
1224
|
+
finally:
|
1225
|
+
try:
|
1226
|
+
c = self.cursor()
|
1227
|
+
try:
|
1228
|
+
c.execute("drop table zxtestingbcp")
|
1229
|
+
self.db.commit()
|
1230
|
+
except:
|
1231
|
+
self.db.rollback()
|
1232
|
+
finally:
|
1233
|
+
c.close()
|
1234
|
+
|
1235
|
+
try:
|
1236
|
+
src.close()
|
1237
|
+
except:
|
1238
|
+
src = None
|
1239
|
+
try:
|
1240
|
+
dst.close()
|
1241
|
+
except:
|
1242
|
+
dst = None
|