rubyfox-server 2.3.0.pre2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (993) hide show
  1. data/.gitignore +17 -0
  2. data/.rvmrc +1 -0
  3. data/Gemfile +3 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +23 -0
  6. data/Rakefile +1 -0
  7. data/bin/smartfox +7 -0
  8. data/lib/rubyfox/server/cli.rb +59 -0
  9. data/lib/rubyfox/server/data/config/.keep +0 -0
  10. data/lib/rubyfox/server/data/config/_backups/.keep +0 -0
  11. data/lib/rubyfox/server/data/config/ascii/boot.txt +5 -0
  12. data/lib/rubyfox/server/data/config/ascii/ready.txt +9 -0
  13. data/lib/rubyfox/server/data/config/core.xml +44 -0
  14. data/lib/rubyfox/server/data/config/crossdomain.xml +10 -0
  15. data/lib/rubyfox/server/data/config/descriptors/.keep +0 -0
  16. data/lib/rubyfox/server/data/config/descriptors/config_room.txt +323 -0
  17. data/lib/rubyfox/server/data/config/descriptors/config_server.txt +621 -0
  18. data/lib/rubyfox/server/data/config/descriptors/config_zone.txt +1021 -0
  19. data/lib/rubyfox/server/data/config/descriptors/runtime_game.txt +63 -0
  20. data/lib/rubyfox/server/data/config/descriptors/runtime_room.txt +377 -0
  21. data/lib/rubyfox/server/data/config/descriptors/runtime_user.txt +589 -0
  22. data/lib/rubyfox/server/data/config/descriptors/runtime_zone.txt +354 -0
  23. data/lib/rubyfox/server/data/config/jetty/.keep +0 -0
  24. data/lib/rubyfox/server/data/config/jetty/jetty.xml +214 -0
  25. data/lib/rubyfox/server/data/config/jetty/realm.properties +21 -0
  26. data/lib/rubyfox/server/data/config/jetty/webdefault.xml +410 -0
  27. data/lib/rubyfox/server/data/config/log4j.properties +75 -0
  28. data/lib/rubyfox/server/data/config/myprop.properties +5 -0
  29. data/lib/rubyfox/server/data/config/server.xml +65 -0
  30. data/lib/rubyfox/server/data/config/templates/sfs2x.unix.txt +12 -0
  31. data/lib/rubyfox/server/data/config/templates/sfs2x.windows.txt +1 -0
  32. data/lib/rubyfox/server/data/config/templates/vmoptions.txt +3 -0
  33. data/lib/rubyfox/server/data/config/wordsFile.txt +13 -0
  34. data/lib/rubyfox/server/data/data/bannedusers/.keep +0 -0
  35. data/lib/rubyfox/server/data/data/bannedusers/users.bin +0 -0
  36. data/lib/rubyfox/server/data/data/buddylists/.keep +0 -0
  37. data/lib/rubyfox/server/data/data/buddylists/BasicExamples/7364666773646667 +0 -0
  38. data/lib/rubyfox/server/data/extensions/.keep +0 -0
  39. data/lib/rubyfox/server/data/extensions/__lib__/.keep +0 -0
  40. data/lib/rubyfox/server/data/lib/Jetty/.keep +0 -0
  41. data/lib/rubyfox/server/data/lib/Jetty/ant-1.6.5.jar +0 -0
  42. data/lib/rubyfox/server/data/lib/Jetty/core-3.1.1.jar +0 -0
  43. data/lib/rubyfox/server/data/lib/Jetty/jetty-6.1.26.jar +0 -0
  44. data/lib/rubyfox/server/data/lib/Jetty/jetty-util-6.1.26.jar +0 -0
  45. data/lib/rubyfox/server/data/lib/Jetty/jsp-2.1-glassfish-2.1.v20091210.jar +0 -0
  46. data/lib/rubyfox/server/data/lib/Jetty/jsp-2.1-jetty-6.1.26.jar +0 -0
  47. data/lib/rubyfox/server/data/lib/Jetty/jsp-api-2.1-glassfish-2.1.v20091210.jar +0 -0
  48. data/lib/rubyfox/server/data/lib/Jetty/servlet-api-2.5-20081211.jar +0 -0
  49. data/lib/rubyfox/server/data/lib/Lib/BaseHTTPServer.py +484 -0
  50. data/lib/rubyfox/server/data/lib/Lib/CGIHTTPServer.py +325 -0
  51. data/lib/rubyfox/server/data/lib/Lib/ConfigParser.py +472 -0
  52. data/lib/rubyfox/server/data/lib/Lib/Cookie.py +742 -0
  53. data/lib/rubyfox/server/data/lib/Lib/HTMLParser.py +383 -0
  54. data/lib/rubyfox/server/data/lib/Lib/MimeWriter.py +181 -0
  55. data/lib/rubyfox/server/data/lib/Lib/Queue.py +151 -0
  56. data/lib/rubyfox/server/data/lib/Lib/SimpleHTTPServer.py +198 -0
  57. data/lib/rubyfox/server/data/lib/Lib/SimpleXMLRPCServer.py +274 -0
  58. data/lib/rubyfox/server/data/lib/Lib/SocketServer.py +576 -0
  59. data/lib/rubyfox/server/data/lib/Lib/StringIO.py +239 -0
  60. data/lib/rubyfox/server/data/lib/Lib/UserDict$py.class +0 -0
  61. data/lib/rubyfox/server/data/lib/Lib/UserDict.py +60 -0
  62. data/lib/rubyfox/server/data/lib/Lib/UserList.py +94 -0
  63. data/lib/rubyfox/server/data/lib/Lib/UserString.py +182 -0
  64. data/lib/rubyfox/server/data/lib/Lib/__future__$py.class +0 -0
  65. data/lib/rubyfox/server/data/lib/Lib/__future__.py +104 -0
  66. data/lib/rubyfox/server/data/lib/Lib/aifc.py +961 -0
  67. data/lib/rubyfox/server/data/lib/Lib/anydbm.py +86 -0
  68. data/lib/rubyfox/server/data/lib/Lib/atexit.py +50 -0
  69. data/lib/rubyfox/server/data/lib/Lib/base64.py +77 -0
  70. data/lib/rubyfox/server/data/lib/Lib/bdb.py +563 -0
  71. data/lib/rubyfox/server/data/lib/Lib/binhex.py +531 -0
  72. data/lib/rubyfox/server/data/lib/Lib/bisect.py +78 -0
  73. data/lib/rubyfox/server/data/lib/Lib/calendar.py +246 -0
  74. data/lib/rubyfox/server/data/lib/Lib/cgi.py +1040 -0
  75. data/lib/rubyfox/server/data/lib/Lib/chunk.py +167 -0
  76. data/lib/rubyfox/server/data/lib/Lib/cmd.py +336 -0
  77. data/lib/rubyfox/server/data/lib/Lib/code$py.class +0 -0
  78. data/lib/rubyfox/server/data/lib/Lib/code.py +311 -0
  79. data/lib/rubyfox/server/data/lib/Lib/codecs$py.class +0 -0
  80. data/lib/rubyfox/server/data/lib/Lib/codecs.py +636 -0
  81. data/lib/rubyfox/server/data/lib/Lib/codeop$py.class +0 -0
  82. data/lib/rubyfox/server/data/lib/Lib/codeop.py +131 -0
  83. data/lib/rubyfox/server/data/lib/Lib/colorsys.py +123 -0
  84. data/lib/rubyfox/server/data/lib/Lib/commands.py +84 -0
  85. data/lib/rubyfox/server/data/lib/Lib/compileall.py +148 -0
  86. data/lib/rubyfox/server/data/lib/Lib/copy.py +330 -0
  87. data/lib/rubyfox/server/data/lib/Lib/copy_reg$py.class +0 -0
  88. data/lib/rubyfox/server/data/lib/Lib/copy_reg.py +78 -0
  89. data/lib/rubyfox/server/data/lib/Lib/datetime$py.class +0 -0
  90. data/lib/rubyfox/server/data/lib/Lib/datetime.py +2007 -0
  91. data/lib/rubyfox/server/data/lib/Lib/dbexts.py +726 -0
  92. data/lib/rubyfox/server/data/lib/Lib/difflib.py +1088 -0
  93. data/lib/rubyfox/server/data/lib/Lib/dircache.py +44 -0
  94. data/lib/rubyfox/server/data/lib/Lib/doctest.py +1173 -0
  95. data/lib/rubyfox/server/data/lib/Lib/dospath.py +341 -0
  96. data/lib/rubyfox/server/data/lib/Lib/dumbdbm.py +170 -0
  97. data/lib/rubyfox/server/data/lib/Lib/email/Charset.py +393 -0
  98. data/lib/rubyfox/server/data/lib/Lib/email/Encoders.py +94 -0
  99. data/lib/rubyfox/server/data/lib/Lib/email/Errors.py +26 -0
  100. data/lib/rubyfox/server/data/lib/Lib/email/Generator.py +378 -0
  101. data/lib/rubyfox/server/data/lib/Lib/email/Header.py +515 -0
  102. data/lib/rubyfox/server/data/lib/Lib/email/Iterators.py +25 -0
  103. data/lib/rubyfox/server/data/lib/Lib/email/MIMEAudio.py +71 -0
  104. data/lib/rubyfox/server/data/lib/Lib/email/MIMEBase.py +24 -0
  105. data/lib/rubyfox/server/data/lib/Lib/email/MIMEImage.py +45 -0
  106. data/lib/rubyfox/server/data/lib/Lib/email/MIMEMessage.py +32 -0
  107. data/lib/rubyfox/server/data/lib/Lib/email/MIMEMultipart.py +37 -0
  108. data/lib/rubyfox/server/data/lib/Lib/email/MIMENonMultipart.py +24 -0
  109. data/lib/rubyfox/server/data/lib/Lib/email/MIMEText.py +45 -0
  110. data/lib/rubyfox/server/data/lib/Lib/email/Message.py +837 -0
  111. data/lib/rubyfox/server/data/lib/Lib/email/Parser.py +292 -0
  112. data/lib/rubyfox/server/data/lib/Lib/email/Utils.py +340 -0
  113. data/lib/rubyfox/server/data/lib/Lib/email/__init__.py +72 -0
  114. data/lib/rubyfox/server/data/lib/Lib/email/_compat21.py +69 -0
  115. data/lib/rubyfox/server/data/lib/Lib/email/_compat22.py +70 -0
  116. data/lib/rubyfox/server/data/lib/Lib/email/_parseaddr.py +480 -0
  117. data/lib/rubyfox/server/data/lib/Lib/email/base64MIME.py +184 -0
  118. data/lib/rubyfox/server/data/lib/Lib/email/quopriMIME.py +323 -0
  119. data/lib/rubyfox/server/data/lib/Lib/email/test/__init__.py +2 -0
  120. data/lib/rubyfox/server/data/lib/Lib/email/test/data/PyBanner048.gif +0 -0
  121. data/lib/rubyfox/server/data/lib/Lib/email/test/data/audiotest.au +0 -0
  122. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_01.txt +19 -0
  123. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_02.txt +135 -0
  124. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_03.txt +16 -0
  125. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_04.txt +37 -0
  126. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_05.txt +28 -0
  127. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_06.txt +33 -0
  128. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_07.txt +83 -0
  129. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_08.txt +24 -0
  130. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_09.txt +24 -0
  131. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_10.txt +32 -0
  132. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_11.txt +7 -0
  133. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_12.txt +36 -0
  134. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_13.txt +94 -0
  135. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_14.txt +23 -0
  136. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_15.txt +52 -0
  137. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_16.txt +123 -0
  138. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_17.txt +12 -0
  139. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_18.txt +6 -0
  140. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_19.txt +43 -0
  141. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_20.txt +22 -0
  142. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_21.txt +20 -0
  143. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_22.txt +46 -0
  144. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_23.txt +8 -0
  145. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_24.txt +10 -0
  146. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_25.txt +117 -0
  147. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_26.txt +45 -0
  148. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_27.txt +15 -0
  149. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_28.txt +25 -0
  150. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_29.txt +22 -0
  151. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_30.txt +23 -0
  152. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_31.txt +15 -0
  153. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_32.txt +14 -0
  154. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_33.txt +29 -0
  155. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_34.txt +19 -0
  156. data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_35.txt +4 -0
  157. data/lib/rubyfox/server/data/lib/Lib/email/test/test_email.py +2718 -0
  158. data/lib/rubyfox/server/data/lib/Lib/email/test/test_email_codecs.py +68 -0
  159. data/lib/rubyfox/server/data/lib/Lib/email/test/test_email_torture.py +136 -0
  160. data/lib/rubyfox/server/data/lib/Lib/encodings/__init__$py.class +0 -0
  161. data/lib/rubyfox/server/data/lib/Lib/encodings/__init__.py +97 -0
  162. data/lib/rubyfox/server/data/lib/Lib/encodings/aliases$py.class +0 -0
  163. data/lib/rubyfox/server/data/lib/Lib/encodings/aliases.py +115 -0
  164. data/lib/rubyfox/server/data/lib/Lib/encodings/ascii.py +35 -0
  165. data/lib/rubyfox/server/data/lib/Lib/encodings/base64_codec.py +62 -0
  166. data/lib/rubyfox/server/data/lib/Lib/encodings/charmap.py +51 -0
  167. data/lib/rubyfox/server/data/lib/Lib/encodings/cp037.py +280 -0
  168. data/lib/rubyfox/server/data/lib/Lib/encodings/cp1006.py +138 -0
  169. data/lib/rubyfox/server/data/lib/Lib/encodings/cp1026.py +280 -0
  170. data/lib/rubyfox/server/data/lib/Lib/encodings/cp1140.py +45 -0
  171. data/lib/rubyfox/server/data/lib/Lib/encodings/cp1250.py +123 -0
  172. data/lib/rubyfox/server/data/lib/Lib/encodings/cp1251.py +157 -0
  173. data/lib/rubyfox/server/data/lib/Lib/encodings/cp1252.py +76 -0
  174. data/lib/rubyfox/server/data/lib/Lib/encodings/cp1253.py +151 -0
  175. data/lib/rubyfox/server/data/lib/Lib/encodings/cp1254.py +82 -0
  176. data/lib/rubyfox/server/data/lib/Lib/encodings/cp1255.py +143 -0
  177. data/lib/rubyfox/server/data/lib/Lib/encodings/cp1256.py +129 -0
  178. data/lib/rubyfox/server/data/lib/Lib/encodings/cp1257.py +131 -0
  179. data/lib/rubyfox/server/data/lib/Lib/encodings/cp1258.py +90 -0
  180. data/lib/rubyfox/server/data/lib/Lib/encodings/cp424.py +280 -0
  181. data/lib/rubyfox/server/data/lib/Lib/encodings/cp437.py +172 -0
  182. data/lib/rubyfox/server/data/lib/Lib/encodings/cp500.py +280 -0
  183. data/lib/rubyfox/server/data/lib/Lib/encodings/cp737.py +172 -0
  184. data/lib/rubyfox/server/data/lib/Lib/encodings/cp775.py +172 -0
  185. data/lib/rubyfox/server/data/lib/Lib/encodings/cp850.py +172 -0
  186. data/lib/rubyfox/server/data/lib/Lib/encodings/cp852.py +172 -0
  187. data/lib/rubyfox/server/data/lib/Lib/encodings/cp855.py +172 -0
  188. data/lib/rubyfox/server/data/lib/Lib/encodings/cp856.py +172 -0
  189. data/lib/rubyfox/server/data/lib/Lib/encodings/cp857.py +171 -0
  190. data/lib/rubyfox/server/data/lib/Lib/encodings/cp860.py +172 -0
  191. data/lib/rubyfox/server/data/lib/Lib/encodings/cp861.py +172 -0
  192. data/lib/rubyfox/server/data/lib/Lib/encodings/cp862.py +172 -0
  193. data/lib/rubyfox/server/data/lib/Lib/encodings/cp863.py +172 -0
  194. data/lib/rubyfox/server/data/lib/Lib/encodings/cp864.py +170 -0
  195. data/lib/rubyfox/server/data/lib/Lib/encodings/cp865.py +172 -0
  196. data/lib/rubyfox/server/data/lib/Lib/encodings/cp866.py +172 -0
  197. data/lib/rubyfox/server/data/lib/Lib/encodings/cp869.py +172 -0
  198. data/lib/rubyfox/server/data/lib/Lib/encodings/cp874.py +171 -0
  199. data/lib/rubyfox/server/data/lib/Lib/encodings/cp875.py +281 -0
  200. data/lib/rubyfox/server/data/lib/Lib/encodings/hex_codec.py +62 -0
  201. data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_1.py +44 -0
  202. data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_10.py +90 -0
  203. data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_13.py +100 -0
  204. data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_14.py +75 -0
  205. data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_15.py +52 -0
  206. data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_2.py +101 -0
  207. data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_3.py +79 -0
  208. data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_4.py +94 -0
  209. data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_5.py +138 -0
  210. data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_6.py +137 -0
  211. data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_7.py +124 -0
  212. data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_8.py +112 -0
  213. data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_9.py +50 -0
  214. data/lib/rubyfox/server/data/lib/Lib/encodings/koi8_r.py +172 -0
  215. data/lib/rubyfox/server/data/lib/Lib/encodings/koi8_u.py +54 -0
  216. data/lib/rubyfox/server/data/lib/Lib/encodings/latin_1.py +35 -0
  217. data/lib/rubyfox/server/data/lib/Lib/encodings/mac_cyrillic.py +167 -0
  218. data/lib/rubyfox/server/data/lib/Lib/encodings/mac_greek.py +170 -0
  219. data/lib/rubyfox/server/data/lib/Lib/encodings/mac_iceland.py +166 -0
  220. data/lib/rubyfox/server/data/lib/Lib/encodings/mac_latin2.py +170 -0
  221. data/lib/rubyfox/server/data/lib/Lib/encodings/mac_roman.py +167 -0
  222. data/lib/rubyfox/server/data/lib/Lib/encodings/mac_turkish.py +167 -0
  223. data/lib/rubyfox/server/data/lib/Lib/encodings/mbcs.py +36 -0
  224. data/lib/rubyfox/server/data/lib/Lib/encodings/quopri_codec.py +58 -0
  225. data/lib/rubyfox/server/data/lib/Lib/encodings/raw_unicode_escape.py +30 -0
  226. data/lib/rubyfox/server/data/lib/Lib/encodings/rot_13.py +105 -0
  227. data/lib/rubyfox/server/data/lib/Lib/encodings/undefined.py +34 -0
  228. data/lib/rubyfox/server/data/lib/Lib/encodings/unicode_escape.py +30 -0
  229. data/lib/rubyfox/server/data/lib/Lib/encodings/unicode_internal.py +30 -0
  230. data/lib/rubyfox/server/data/lib/Lib/encodings/utf_16.py +61 -0
  231. data/lib/rubyfox/server/data/lib/Lib/encodings/utf_16_be.py +31 -0
  232. data/lib/rubyfox/server/data/lib/Lib/encodings/utf_16_le.py +31 -0
  233. data/lib/rubyfox/server/data/lib/Lib/encodings/utf_7.py +27 -0
  234. data/lib/rubyfox/server/data/lib/Lib/encodings/utf_8$py.class +0 -0
  235. data/lib/rubyfox/server/data/lib/Lib/encodings/utf_8.py +31 -0
  236. data/lib/rubyfox/server/data/lib/Lib/encodings/uu_codec.py +112 -0
  237. data/lib/rubyfox/server/data/lib/Lib/encodings/zlib_codec.py +63 -0
  238. data/lib/rubyfox/server/data/lib/Lib/fileinput.py +349 -0
  239. data/lib/rubyfox/server/data/lib/Lib/fnmatch.py +107 -0
  240. data/lib/rubyfox/server/data/lib/Lib/formatter.py +454 -0
  241. data/lib/rubyfox/server/data/lib/Lib/fpformat.py +142 -0
  242. data/lib/rubyfox/server/data/lib/Lib/ftplib.py +804 -0
  243. data/lib/rubyfox/server/data/lib/Lib/getopt.py +143 -0
  244. data/lib/rubyfox/server/data/lib/Lib/glob.py +56 -0
  245. data/lib/rubyfox/server/data/lib/Lib/gopherlib.py +205 -0
  246. data/lib/rubyfox/server/data/lib/Lib/gzip.py +390 -0
  247. data/lib/rubyfox/server/data/lib/Lib/hmac.py +99 -0
  248. data/lib/rubyfox/server/data/lib/Lib/htmlentitydefs.py +257 -0
  249. data/lib/rubyfox/server/data/lib/Lib/htmllib.py +475 -0
  250. data/lib/rubyfox/server/data/lib/Lib/httplib.py +1238 -0
  251. data/lib/rubyfox/server/data/lib/Lib/imaplib.py +1208 -0
  252. data/lib/rubyfox/server/data/lib/Lib/imghdr.py +154 -0
  253. data/lib/rubyfox/server/data/lib/Lib/inspect$py.class +0 -0
  254. data/lib/rubyfox/server/data/lib/Lib/inspect.py +787 -0
  255. data/lib/rubyfox/server/data/lib/Lib/isql.py +238 -0
  256. data/lib/rubyfox/server/data/lib/Lib/javaos$py.class +0 -0
  257. data/lib/rubyfox/server/data/lib/Lib/javaos.py +395 -0
  258. data/lib/rubyfox/server/data/lib/Lib/javapath$py.class +0 -0
  259. data/lib/rubyfox/server/data/lib/Lib/javapath.py +349 -0
  260. data/lib/rubyfox/server/data/lib/Lib/javashell.py +194 -0
  261. data/lib/rubyfox/server/data/lib/Lib/jreload.py +119 -0
  262. data/lib/rubyfox/server/data/lib/Lib/jxxload_help/DiscardHelp.java +59 -0
  263. data/lib/rubyfox/server/data/lib/Lib/jxxload_help/JavaLoaderFactory.java +9 -0
  264. data/lib/rubyfox/server/data/lib/Lib/jxxload_help/PackageManager.java +58 -0
  265. data/lib/rubyfox/server/data/lib/Lib/jxxload_help/PathVFS.java +98 -0
  266. data/lib/rubyfox/server/data/lib/Lib/jxxload_help/PathVFSJavaLoader.java +49 -0
  267. data/lib/rubyfox/server/data/lib/Lib/keyword.py +97 -0
  268. data/lib/rubyfox/server/data/lib/Lib/linecache$py.class +0 -0
  269. data/lib/rubyfox/server/data/lib/Lib/linecache.py +101 -0
  270. data/lib/rubyfox/server/data/lib/Lib/macpath.py +242 -0
  271. data/lib/rubyfox/server/data/lib/Lib/macurl2path.py +95 -0
  272. data/lib/rubyfox/server/data/lib/Lib/mailbox.py +313 -0
  273. data/lib/rubyfox/server/data/lib/Lib/mailcap.py +255 -0
  274. data/lib/rubyfox/server/data/lib/Lib/markupbase.py +317 -0
  275. data/lib/rubyfox/server/data/lib/Lib/marshal.py +315 -0
  276. data/lib/rubyfox/server/data/lib/Lib/mhlib.py +1003 -0
  277. data/lib/rubyfox/server/data/lib/Lib/mimetools.py +226 -0
  278. data/lib/rubyfox/server/data/lib/Lib/mimetypes.py +435 -0
  279. data/lib/rubyfox/server/data/lib/Lib/mimify.py +464 -0
  280. data/lib/rubyfox/server/data/lib/Lib/multifile.py +160 -0
  281. data/lib/rubyfox/server/data/lib/Lib/mutex.py +51 -0
  282. data/lib/rubyfox/server/data/lib/Lib/netrc.py +108 -0
  283. data/lib/rubyfox/server/data/lib/Lib/nntplib.py +575 -0
  284. data/lib/rubyfox/server/data/lib/Lib/ntpath.py +482 -0
  285. data/lib/rubyfox/server/data/lib/Lib/nturl2path.py +66 -0
  286. data/lib/rubyfox/server/data/lib/Lib/pawt/__init__.py +35 -0
  287. data/lib/rubyfox/server/data/lib/Lib/pawt/colors.py +144 -0
  288. data/lib/rubyfox/server/data/lib/Lib/pawt/swing.py +42 -0
  289. data/lib/rubyfox/server/data/lib/Lib/pdb.py +979 -0
  290. data/lib/rubyfox/server/data/lib/Lib/pickle.py +990 -0
  291. data/lib/rubyfox/server/data/lib/Lib/pipes.py +297 -0
  292. data/lib/rubyfox/server/data/lib/Lib/popen2.py +304 -0
  293. data/lib/rubyfox/server/data/lib/Lib/poplib.py +335 -0
  294. data/lib/rubyfox/server/data/lib/Lib/posixfile.py +240 -0
  295. data/lib/rubyfox/server/data/lib/Lib/posixpath.py +414 -0
  296. data/lib/rubyfox/server/data/lib/Lib/pprint.py +310 -0
  297. data/lib/rubyfox/server/data/lib/Lib/profile.py +556 -0
  298. data/lib/rubyfox/server/data/lib/Lib/pstats.py +641 -0
  299. data/lib/rubyfox/server/data/lib/Lib/pyclbr.py +337 -0
  300. data/lib/rubyfox/server/data/lib/Lib/quopri.py +237 -0
  301. data/lib/rubyfox/server/data/lib/Lib/random$py.class +0 -0
  302. data/lib/rubyfox/server/data/lib/Lib/random.py +779 -0
  303. data/lib/rubyfox/server/data/lib/Lib/re$py.class +0 -0
  304. data/lib/rubyfox/server/data/lib/Lib/re.py +11 -0
  305. data/lib/rubyfox/server/data/lib/Lib/reconvert.py +192 -0
  306. data/lib/rubyfox/server/data/lib/Lib/reindex$py.class +0 -0
  307. data/lib/rubyfox/server/data/lib/Lib/repr.py +95 -0
  308. data/lib/rubyfox/server/data/lib/Lib/rfc822.py +1010 -0
  309. data/lib/rubyfox/server/data/lib/Lib/sched.py +106 -0
  310. data/lib/rubyfox/server/data/lib/Lib/select.py +211 -0
  311. data/lib/rubyfox/server/data/lib/Lib/servlet-api-2.5-20081211.jar +0 -0
  312. data/lib/rubyfox/server/data/lib/Lib/setsfactory.py +10 -0
  313. data/lib/rubyfox/server/data/lib/Lib/sfs2x-lms.jar +0 -0
  314. data/lib/rubyfox/server/data/lib/Lib/sgmllib.py +516 -0
  315. data/lib/rubyfox/server/data/lib/Lib/shelve.py +158 -0
  316. data/lib/rubyfox/server/data/lib/Lib/shlex.py +209 -0
  317. data/lib/rubyfox/server/data/lib/Lib/shutil$py.class +0 -0
  318. data/lib/rubyfox/server/data/lib/Lib/shutil.py +138 -0
  319. data/lib/rubyfox/server/data/lib/Lib/site.py +263 -0
  320. data/lib/rubyfox/server/data/lib/Lib/smtplib.py +729 -0
  321. data/lib/rubyfox/server/data/lib/Lib/sndhdr.py +228 -0
  322. data/lib/rubyfox/server/data/lib/Lib/socket.py +902 -0
  323. data/lib/rubyfox/server/data/lib/Lib/sre$py.class +0 -0
  324. data/lib/rubyfox/server/data/lib/Lib/sre.py +311 -0
  325. data/lib/rubyfox/server/data/lib/Lib/sre_compile$py.class +0 -0
  326. data/lib/rubyfox/server/data/lib/Lib/sre_compile.py +455 -0
  327. data/lib/rubyfox/server/data/lib/Lib/sre_constants$py.class +0 -0
  328. data/lib/rubyfox/server/data/lib/Lib/sre_constants.py +259 -0
  329. data/lib/rubyfox/server/data/lib/Lib/sre_parse$py.class +0 -0
  330. data/lib/rubyfox/server/data/lib/Lib/sre_parse.py +738 -0
  331. data/lib/rubyfox/server/data/lib/Lib/stat$py.class +0 -0
  332. data/lib/rubyfox/server/data/lib/Lib/stat.py +86 -0
  333. data/lib/rubyfox/server/data/lib/Lib/string$py.class +0 -0
  334. data/lib/rubyfox/server/data/lib/Lib/string.py +437 -0
  335. data/lib/rubyfox/server/data/lib/Lib/symbol.py +95 -0
  336. data/lib/rubyfox/server/data/lib/Lib/telnetlib.py +662 -0
  337. data/lib/rubyfox/server/data/lib/Lib/tempfile.py +255 -0
  338. data/lib/rubyfox/server/data/lib/Lib/test/Graph.py +62 -0
  339. data/lib/rubyfox/server/data/lib/Lib/test/README +372 -0
  340. data/lib/rubyfox/server/data/lib/Lib/test/__init__.py +1 -0
  341. data/lib/rubyfox/server/data/lib/Lib/test/audiotest.au +0 -0
  342. data/lib/rubyfox/server/data/lib/Lib/test/autotest.py +6 -0
  343. data/lib/rubyfox/server/data/lib/Lib/test/badsyntax_future3.py +10 -0
  344. data/lib/rubyfox/server/data/lib/Lib/test/badsyntax_future4.py +10 -0
  345. data/lib/rubyfox/server/data/lib/Lib/test/badsyntax_future5.py +12 -0
  346. data/lib/rubyfox/server/data/lib/Lib/test/badsyntax_future6.py +10 -0
  347. data/lib/rubyfox/server/data/lib/Lib/test/badsyntax_future7.py +11 -0
  348. data/lib/rubyfox/server/data/lib/Lib/test/badsyntax_nocaret.py +2 -0
  349. data/lib/rubyfox/server/data/lib/Lib/test/blob.jar +0 -0
  350. data/lib/rubyfox/server/data/lib/Lib/test/bugs/bugs100.py +139 -0
  351. data/lib/rubyfox/server/data/lib/Lib/test/bugs/bugs101.py +57 -0
  352. data/lib/rubyfox/server/data/lib/Lib/test/bugs/jdkbugs.py +10 -0
  353. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr101.py +59 -0
  354. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr104.py +9 -0
  355. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr112.py +14 -0
  356. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr119.py +16 -0
  357. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr127.py +10 -0
  358. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr133/__init__.py +1 -0
  359. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr133/test.py +2 -0
  360. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr133.py +12 -0
  361. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr134.py +9 -0
  362. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr139.py +7 -0
  363. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr142.py +1 -0
  364. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr144.py +2 -0
  365. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr148.py +2 -0
  366. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr149.py +7 -0
  367. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr155.py +13 -0
  368. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr170.py +7 -0
  369. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr171.py +9 -0
  370. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr174.py +9 -0
  371. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr178.py +10 -0
  372. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr183.py +5 -0
  373. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr186.py +10 -0
  374. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr191.py +5 -0
  375. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr192.py +81 -0
  376. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr195.py +11 -0
  377. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr208.py +26 -0
  378. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr233.py +8 -0
  379. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr234.py +16 -0
  380. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr235.py +14 -0
  381. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr239.py +6 -0
  382. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr241.py +16 -0
  383. data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr242.py +12 -0
  384. data/lib/rubyfox/server/data/lib/Lib/test/data/PyBanner048.gif +0 -0
  385. data/lib/rubyfox/server/data/lib/Lib/test/data/msg_01.txt +19 -0
  386. data/lib/rubyfox/server/data/lib/Lib/test/data/msg_02.txt +135 -0
  387. data/lib/rubyfox/server/data/lib/Lib/test/data/msg_03.txt +16 -0
  388. data/lib/rubyfox/server/data/lib/Lib/test/data/msg_04.txt +37 -0
  389. data/lib/rubyfox/server/data/lib/Lib/test/data/msg_05.txt +28 -0
  390. data/lib/rubyfox/server/data/lib/Lib/test/data/msg_06.txt +33 -0
  391. data/lib/rubyfox/server/data/lib/Lib/test/data/msg_07.txt +83 -0
  392. data/lib/rubyfox/server/data/lib/Lib/test/data/msg_08.txt +24 -0
  393. data/lib/rubyfox/server/data/lib/Lib/test/data/msg_09.txt +24 -0
  394. data/lib/rubyfox/server/data/lib/Lib/test/data/msg_10.txt +32 -0
  395. data/lib/rubyfox/server/data/lib/Lib/test/data/msg_11.txt +7 -0
  396. data/lib/rubyfox/server/data/lib/Lib/test/data/msg_12.txt +36 -0
  397. data/lib/rubyfox/server/data/lib/Lib/test/data/msg_13.txt +94 -0
  398. data/lib/rubyfox/server/data/lib/Lib/test/data/msg_14.txt +23 -0
  399. data/lib/rubyfox/server/data/lib/Lib/test/data/msg_15.txt +52 -0
  400. data/lib/rubyfox/server/data/lib/Lib/test/data/msg_16.txt +123 -0
  401. data/lib/rubyfox/server/data/lib/Lib/test/data/msg_17.txt +12 -0
  402. data/lib/rubyfox/server/data/lib/Lib/test/data/msg_18.txt +6 -0
  403. data/lib/rubyfox/server/data/lib/Lib/test/data/msg_19.txt +43 -0
  404. data/lib/rubyfox/server/data/lib/Lib/test/data/msg_20.txt +22 -0
  405. data/lib/rubyfox/server/data/lib/Lib/test/data/msg_21.txt +22 -0
  406. data/lib/rubyfox/server/data/lib/Lib/test/data/msg_22.txt +46 -0
  407. data/lib/rubyfox/server/data/lib/Lib/test/data/msg_23.txt +8 -0
  408. data/lib/rubyfox/server/data/lib/Lib/test/double_const.py +30 -0
  409. data/lib/rubyfox/server/data/lib/Lib/test/greyrgb.uue +1547 -0
  410. data/lib/rubyfox/server/data/lib/Lib/test/javatests/AnonInner.java +20 -0
  411. data/lib/rubyfox/server/data/lib/Lib/test/javatests/Foo.java +3 -0
  412. data/lib/rubyfox/server/data/lib/Lib/test/javatests/JOverload.java +132 -0
  413. data/lib/rubyfox/server/data/lib/Lib/test/javatests/ListTest.java +638 -0
  414. data/lib/rubyfox/server/data/lib/Lib/test/javatests/SubFoo.java +3 -0
  415. data/lib/rubyfox/server/data/lib/Lib/test/javatests/TestSupport.java +49 -0
  416. data/lib/rubyfox/server/data/lib/Lib/test/javatests/__init__.py +0 -0
  417. data/lib/rubyfox/server/data/lib/Lib/test/jser2_classes.py +47 -0
  418. data/lib/rubyfox/server/data/lib/Lib/test/output/test_MimeWriter +110 -0
  419. data/lib/rubyfox/server/data/lib/Lib/test/output/test_array +4 -0
  420. data/lib/rubyfox/server/data/lib/Lib/test/output/test_asynchat +3 -0
  421. data/lib/rubyfox/server/data/lib/Lib/test/output/test_augassign +51 -0
  422. data/lib/rubyfox/server/data/lib/Lib/test/output/test_binascii +29 -0
  423. data/lib/rubyfox/server/data/lib/Lib/test/output/test_builtin +53 -0
  424. data/lib/rubyfox/server/data/lib/Lib/test/output/test_cfgparser +9 -0
  425. data/lib/rubyfox/server/data/lib/Lib/test/output/test_cgi +29 -0
  426. data/lib/rubyfox/server/data/lib/Lib/test/output/test_charmapcodec +16 -0
  427. data/lib/rubyfox/server/data/lib/Lib/test/output/test_class +101 -0
  428. data/lib/rubyfox/server/data/lib/Lib/test/output/test_coercion +1054 -0
  429. data/lib/rubyfox/server/data/lib/Lib/test/output/test_compare +101 -0
  430. data/lib/rubyfox/server/data/lib/Lib/test/output/test_compile +7 -0
  431. data/lib/rubyfox/server/data/lib/Lib/test/output/test_cookie +32 -0
  432. data/lib/rubyfox/server/data/lib/Lib/test/output/test_exceptions +52 -0
  433. data/lib/rubyfox/server/data/lib/Lib/test/output/test_extcall +112 -0
  434. data/lib/rubyfox/server/data/lib/Lib/test/output/test_frozen +4 -0
  435. data/lib/rubyfox/server/data/lib/Lib/test/output/test_future +9 -0
  436. data/lib/rubyfox/server/data/lib/Lib/test/output/test_gettext +46 -0
  437. data/lib/rubyfox/server/data/lib/Lib/test/output/test_global +5 -0
  438. data/lib/rubyfox/server/data/lib/Lib/test/output/test_grammar +66 -0
  439. data/lib/rubyfox/server/data/lib/Lib/test/output/test_httplib +10 -0
  440. data/lib/rubyfox/server/data/lib/Lib/test/output/test_janoninner +5 -0
  441. data/lib/rubyfox/server/data/lib/Lib/test/output/test_javalist +6 -0
  442. data/lib/rubyfox/server/data/lib/Lib/test/output/test_jbasic +13 -0
  443. data/lib/rubyfox/server/data/lib/Lib/test/output/test_jser +12 -0
  444. data/lib/rubyfox/server/data/lib/Lib/test/output/test_jsubclass +5 -0
  445. data/lib/rubyfox/server/data/lib/Lib/test/output/test_linuxaudiodev +7 -0
  446. data/lib/rubyfox/server/data/lib/Lib/test/output/test_longexp +2 -0
  447. data/lib/rubyfox/server/data/lib/Lib/test/output/test_math +26 -0
  448. data/lib/rubyfox/server/data/lib/Lib/test/output/test_md5 +9 -0
  449. data/lib/rubyfox/server/data/lib/Lib/test/output/test_methods +6 -0
  450. data/lib/rubyfox/server/data/lib/Lib/test/output/test_mimetools +5 -0
  451. data/lib/rubyfox/server/data/lib/Lib/test/output/test_mmap +34 -0
  452. data/lib/rubyfox/server/data/lib/Lib/test/output/test_new +7 -0
  453. data/lib/rubyfox/server/data/lib/Lib/test/output/test_nis +2 -0
  454. data/lib/rubyfox/server/data/lib/Lib/test/output/test_opcodes +4 -0
  455. data/lib/rubyfox/server/data/lib/Lib/test/output/test_openpty +2 -0
  456. data/lib/rubyfox/server/data/lib/Lib/test/output/test_operations +28 -0
  457. data/lib/rubyfox/server/data/lib/Lib/test/output/test_pkg +45 -0
  458. data/lib/rubyfox/server/data/lib/Lib/test/output/test_poll +17 -0
  459. data/lib/rubyfox/server/data/lib/Lib/test/output/test_popen2 +9 -0
  460. data/lib/rubyfox/server/data/lib/Lib/test/output/test_posixpath +2 -0
  461. data/lib/rubyfox/server/data/lib/Lib/test/output/test_pow +17 -0
  462. data/lib/rubyfox/server/data/lib/Lib/test/output/test_profile +17 -0
  463. data/lib/rubyfox/server/data/lib/Lib/test/output/test_pty +3 -0
  464. data/lib/rubyfox/server/data/lib/Lib/test/output/test_pwd +7 -0
  465. data/lib/rubyfox/server/data/lib/Lib/test/output/test_pyexpat +110 -0
  466. data/lib/rubyfox/server/data/lib/Lib/test/output/test_re +15 -0
  467. data/lib/rubyfox/server/data/lib/Lib/test/output/test_regex +29 -0
  468. data/lib/rubyfox/server/data/lib/Lib/test/output/test_rgbimg +2 -0
  469. data/lib/rubyfox/server/data/lib/Lib/test/output/test_richcmp +187 -0
  470. data/lib/rubyfox/server/data/lib/Lib/test/output/test_rotor +5 -0
  471. data/lib/rubyfox/server/data/lib/Lib/test/output/test_scope +24 -0
  472. data/lib/rubyfox/server/data/lib/Lib/test/output/test_signal +2 -0
  473. data/lib/rubyfox/server/data/lib/Lib/test/output/test_string +18 -0
  474. data/lib/rubyfox/server/data/lib/Lib/test/output/test_thread +4 -0
  475. data/lib/rubyfox/server/data/lib/Lib/test/output/test_threadedtempfile +5 -0
  476. data/lib/rubyfox/server/data/lib/Lib/test/output/test_time +9 -0
  477. data/lib/rubyfox/server/data/lib/Lib/test/output/test_tokenize +648 -0
  478. data/lib/rubyfox/server/data/lib/Lib/test/output/test_types +15 -0
  479. data/lib/rubyfox/server/data/lib/Lib/test/output/test_ucn +7 -0
  480. data/lib/rubyfox/server/data/lib/Lib/test/output/test_unicode +21 -0
  481. data/lib/rubyfox/server/data/lib/Lib/test/output/test_unicode_file +2 -0
  482. data/lib/rubyfox/server/data/lib/Lib/test/output/test_unicodedata +5 -0
  483. data/lib/rubyfox/server/data/lib/Lib/test/output/test_unpack +15 -0
  484. data/lib/rubyfox/server/data/lib/Lib/test/output/test_urlparse +47 -0
  485. data/lib/rubyfox/server/data/lib/Lib/test/output/test_winreg +3 -0
  486. data/lib/rubyfox/server/data/lib/Lib/test/output/test_winsound +2 -0
  487. data/lib/rubyfox/server/data/lib/Lib/test/output/test_xreadline +4 -0
  488. data/lib/rubyfox/server/data/lib/Lib/test/pickletester.py +285 -0
  489. data/lib/rubyfox/server/data/lib/Lib/test/pydocfodder.py +210 -0
  490. data/lib/rubyfox/server/data/lib/Lib/test/pystone.py +252 -0
  491. data/lib/rubyfox/server/data/lib/Lib/test/re_tests.py +590 -0
  492. data/lib/rubyfox/server/data/lib/Lib/test/regex_tests.py +287 -0
  493. data/lib/rubyfox/server/data/lib/Lib/test/regrtest.py +1096 -0
  494. data/lib/rubyfox/server/data/lib/Lib/test/reperf.py +23 -0
  495. data/lib/rubyfox/server/data/lib/Lib/test/sortperf.py +141 -0
  496. data/lib/rubyfox/server/data/lib/Lib/test/string_tests.py +265 -0
  497. data/lib/rubyfox/server/data/lib/Lib/test/test.xml +115 -0
  498. data/lib/rubyfox/server/data/lib/Lib/test/test.xml.out +115 -0
  499. data/lib/rubyfox/server/data/lib/Lib/test/test_MimeWriter.py +170 -0
  500. data/lib/rubyfox/server/data/lib/Lib/test/test_SimpleXMLRPCServer.py +88 -0
  501. data/lib/rubyfox/server/data/lib/Lib/test/test_StringIO.py +113 -0
  502. data/lib/rubyfox/server/data/lib/Lib/test/test___all__.py +158 -0
  503. data/lib/rubyfox/server/data/lib/Lib/test/test___future__.py +59 -0
  504. data/lib/rubyfox/server/data/lib/Lib/test/test_al.py +23 -0
  505. data/lib/rubyfox/server/data/lib/Lib/test/test_array.py +438 -0
  506. data/lib/rubyfox/server/data/lib/Lib/test/test_asynchat.py +58 -0
  507. data/lib/rubyfox/server/data/lib/Lib/test/test_atexit.py +66 -0
  508. data/lib/rubyfox/server/data/lib/Lib/test/test_audioop.py +264 -0
  509. data/lib/rubyfox/server/data/lib/Lib/test/test_augassign.py +261 -0
  510. data/lib/rubyfox/server/data/lib/Lib/test/test_b1.py +632 -0
  511. data/lib/rubyfox/server/data/lib/Lib/test/test_b2.py +365 -0
  512. data/lib/rubyfox/server/data/lib/Lib/test/test_base64.py +53 -0
  513. data/lib/rubyfox/server/data/lib/Lib/test/test_bastion.py +3 -0
  514. data/lib/rubyfox/server/data/lib/Lib/test/test_binascii.py +119 -0
  515. data/lib/rubyfox/server/data/lib/Lib/test/test_binhex.py +50 -0
  516. data/lib/rubyfox/server/data/lib/Lib/test/test_binop.py +328 -0
  517. data/lib/rubyfox/server/data/lib/Lib/test/test_bisect.py +127 -0
  518. data/lib/rubyfox/server/data/lib/Lib/test/test_bsddb.py +76 -0
  519. data/lib/rubyfox/server/data/lib/Lib/test/test_bufio.py +60 -0
  520. data/lib/rubyfox/server/data/lib/Lib/test/test_bugfixes.py +31 -0
  521. data/lib/rubyfox/server/data/lib/Lib/test/test_builtin.py +13 -0
  522. data/lib/rubyfox/server/data/lib/Lib/test/test_calendar.py +61 -0
  523. data/lib/rubyfox/server/data/lib/Lib/test/test_call.py +131 -0
  524. data/lib/rubyfox/server/data/lib/Lib/test/test_capi.py +16 -0
  525. data/lib/rubyfox/server/data/lib/Lib/test/test_cd.py +26 -0
  526. data/lib/rubyfox/server/data/lib/Lib/test/test_cfgparser.py +284 -0
  527. data/lib/rubyfox/server/data/lib/Lib/test/test_cgi.py +188 -0
  528. data/lib/rubyfox/server/data/lib/Lib/test/test_charmapcodec.py +43 -0
  529. data/lib/rubyfox/server/data/lib/Lib/test/test_cl.py +78 -0
  530. data/lib/rubyfox/server/data/lib/Lib/test/test_class.py +317 -0
  531. data/lib/rubyfox/server/data/lib/Lib/test/test_cmath.py +35 -0
  532. data/lib/rubyfox/server/data/lib/Lib/test/test_codecs.py +31 -0
  533. data/lib/rubyfox/server/data/lib/Lib/test/test_codeop.py +190 -0
  534. data/lib/rubyfox/server/data/lib/Lib/test/test_coercion.py +118 -0
  535. data/lib/rubyfox/server/data/lib/Lib/test/test_commands.py +52 -0
  536. data/lib/rubyfox/server/data/lib/Lib/test/test_compare.py +56 -0
  537. data/lib/rubyfox/server/data/lib/Lib/test/test_compile.py +129 -0
  538. data/lib/rubyfox/server/data/lib/Lib/test/test_complex.py +68 -0
  539. data/lib/rubyfox/server/data/lib/Lib/test/test_contains.py +133 -0
  540. data/lib/rubyfox/server/data/lib/Lib/test/test_cookie.py +47 -0
  541. data/lib/rubyfox/server/data/lib/Lib/test/test_copy_reg.py +30 -0
  542. data/lib/rubyfox/server/data/lib/Lib/test/test_cpickle.py +81 -0
  543. data/lib/rubyfox/server/data/lib/Lib/test/test_crypt.py +11 -0
  544. data/lib/rubyfox/server/data/lib/Lib/test/test_curses.py +210 -0
  545. data/lib/rubyfox/server/data/lib/Lib/test/test_datetime.py +2958 -0
  546. data/lib/rubyfox/server/data/lib/Lib/test/test_dbm.py +43 -0
  547. data/lib/rubyfox/server/data/lib/Lib/test/test_descr.py +4094 -0
  548. data/lib/rubyfox/server/data/lib/Lib/test/test_descrtut.py +501 -0
  549. data/lib/rubyfox/server/data/lib/Lib/test/test_difflib.py +2 -0
  550. data/lib/rubyfox/server/data/lib/Lib/test/test_dircache.py +74 -0
  551. data/lib/rubyfox/server/data/lib/Lib/test/test_dl.py +33 -0
  552. data/lib/rubyfox/server/data/lib/Lib/test/test_doctest.py +2 -0
  553. data/lib/rubyfox/server/data/lib/Lib/test/test_doctest2.py +108 -0
  554. data/lib/rubyfox/server/data/lib/Lib/test/test_dospath.py +61 -0
  555. data/lib/rubyfox/server/data/lib/Lib/test/test_dumbdbm.py +79 -0
  556. data/lib/rubyfox/server/data/lib/Lib/test/test_email.py +13 -0
  557. data/lib/rubyfox/server/data/lib/Lib/test/test_email_codecs.py +11 -0
  558. data/lib/rubyfox/server/data/lib/Lib/test/test_enumerate.py +150 -0
  559. data/lib/rubyfox/server/data/lib/Lib/test/test_errno.py +49 -0
  560. data/lib/rubyfox/server/data/lib/Lib/test/test_exceptions.py +206 -0
  561. data/lib/rubyfox/server/data/lib/Lib/test/test_extcall.py +268 -0
  562. data/lib/rubyfox/server/data/lib/Lib/test/test_fcntl.py +53 -0
  563. data/lib/rubyfox/server/data/lib/Lib/test/test_file.py +63 -0
  564. data/lib/rubyfox/server/data/lib/Lib/test/test_fileinput.py +159 -0
  565. data/lib/rubyfox/server/data/lib/Lib/test/test_fnmatch.py +46 -0
  566. data/lib/rubyfox/server/data/lib/Lib/test/test_fork1.py +75 -0
  567. data/lib/rubyfox/server/data/lib/Lib/test/test_format.py +218 -0
  568. data/lib/rubyfox/server/data/lib/Lib/test/test_fpformat.py +75 -0
  569. data/lib/rubyfox/server/data/lib/Lib/test/test_frozen.py +26 -0
  570. data/lib/rubyfox/server/data/lib/Lib/test/test_funcattrs.py +384 -0
  571. data/lib/rubyfox/server/data/lib/Lib/test/test_future.py +47 -0
  572. data/lib/rubyfox/server/data/lib/Lib/test/test_future1.py +11 -0
  573. data/lib/rubyfox/server/data/lib/Lib/test/test_future2.py +10 -0
  574. data/lib/rubyfox/server/data/lib/Lib/test/test_future3.py +11 -0
  575. data/lib/rubyfox/server/data/lib/Lib/test/test_gc.py +346 -0
  576. data/lib/rubyfox/server/data/lib/Lib/test/test_gdbm.py +46 -0
  577. data/lib/rubyfox/server/data/lib/Lib/test/test_generators.py +1385 -0
  578. data/lib/rubyfox/server/data/lib/Lib/test/test_getargs.py +26 -0
  579. data/lib/rubyfox/server/data/lib/Lib/test/test_getopt.py +110 -0
  580. data/lib/rubyfox/server/data/lib/Lib/test/test_gettext.py +200 -0
  581. data/lib/rubyfox/server/data/lib/Lib/test/test_gl.py +150 -0
  582. data/lib/rubyfox/server/data/lib/Lib/test/test_glob.py +115 -0
  583. data/lib/rubyfox/server/data/lib/Lib/test/test_global.py +51 -0
  584. data/lib/rubyfox/server/data/lib/Lib/test/test_grammar.py +732 -0
  585. data/lib/rubyfox/server/data/lib/Lib/test/test_grp.py +27 -0
  586. data/lib/rubyfox/server/data/lib/Lib/test/test_gzip.py +82 -0
  587. data/lib/rubyfox/server/data/lib/Lib/test/test_hash.py +36 -0
  588. data/lib/rubyfox/server/data/lib/Lib/test/test_hmac.py +108 -0
  589. data/lib/rubyfox/server/data/lib/Lib/test/test_hotshot.py +117 -0
  590. data/lib/rubyfox/server/data/lib/Lib/test/test_htmllib.py +42 -0
  591. data/lib/rubyfox/server/data/lib/Lib/test/test_htmlparser.py +294 -0
  592. data/lib/rubyfox/server/data/lib/Lib/test/test_httplib.py +58 -0
  593. data/lib/rubyfox/server/data/lib/Lib/test/test_imageop.py +171 -0
  594. data/lib/rubyfox/server/data/lib/Lib/test/test_imgfile.py +116 -0
  595. data/lib/rubyfox/server/data/lib/Lib/test/test_import.py +71 -0
  596. data/lib/rubyfox/server/data/lib/Lib/test/test_importhooks.py +215 -0
  597. data/lib/rubyfox/server/data/lib/Lib/test/test_inspect.py +365 -0
  598. data/lib/rubyfox/server/data/lib/Lib/test/test_iter.py +784 -0
  599. data/lib/rubyfox/server/data/lib/Lib/test/test_janoninner.py +15 -0
  600. data/lib/rubyfox/server/data/lib/Lib/test/test_javalist.py +53 -0
  601. data/lib/rubyfox/server/data/lib/Lib/test/test_javashell.py +182 -0
  602. data/lib/rubyfox/server/data/lib/Lib/test/test_jbasic.py +119 -0
  603. data/lib/rubyfox/server/data/lib/Lib/test/test_joverload.py +138 -0
  604. data/lib/rubyfox/server/data/lib/Lib/test/test_jreload.py +33 -0
  605. data/lib/rubyfox/server/data/lib/Lib/test/test_jser.py +57 -0
  606. data/lib/rubyfox/server/data/lib/Lib/test/test_jser2.py +93 -0
  607. data/lib/rubyfox/server/data/lib/Lib/test/test_jsubclass.py +49 -0
  608. data/lib/rubyfox/server/data/lib/Lib/test/test_jy_compile.py +168 -0
  609. data/lib/rubyfox/server/data/lib/Lib/test/test_jy_generators.py +165 -0
  610. data/lib/rubyfox/server/data/lib/Lib/test/test_jy_internals.py +130 -0
  611. data/lib/rubyfox/server/data/lib/Lib/test/test_largefile.py +169 -0
  612. data/lib/rubyfox/server/data/lib/Lib/test/test_linuxaudiodev.py +89 -0
  613. data/lib/rubyfox/server/data/lib/Lib/test/test_locale.py +44 -0
  614. data/lib/rubyfox/server/data/lib/Lib/test/test_long.py +445 -0
  615. data/lib/rubyfox/server/data/lib/Lib/test/test_long_future.py +55 -0
  616. data/lib/rubyfox/server/data/lib/Lib/test/test_long_int_args.py +61 -0
  617. data/lib/rubyfox/server/data/lib/Lib/test/test_longexp.py +16 -0
  618. data/lib/rubyfox/server/data/lib/Lib/test/test_mailbox.py +113 -0
  619. data/lib/rubyfox/server/data/lib/Lib/test/test_marshal.py +44 -0
  620. data/lib/rubyfox/server/data/lib/Lib/test/test_math.py +153 -0
  621. data/lib/rubyfox/server/data/lib/Lib/test/test_md5.py +30 -0
  622. data/lib/rubyfox/server/data/lib/Lib/test/test_methods.py +62 -0
  623. data/lib/rubyfox/server/data/lib/Lib/test/test_mhlib.py +353 -0
  624. data/lib/rubyfox/server/data/lib/Lib/test/test_mimetools.py +18 -0
  625. data/lib/rubyfox/server/data/lib/Lib/test/test_mimetypes.py +59 -0
  626. data/lib/rubyfox/server/data/lib/Lib/test/test_minidom.py +648 -0
  627. data/lib/rubyfox/server/data/lib/Lib/test/test_mmap.py +317 -0
  628. data/lib/rubyfox/server/data/lib/Lib/test/test_module.py +77 -0
  629. data/lib/rubyfox/server/data/lib/Lib/test/test_multifile.py +66 -0
  630. data/lib/rubyfox/server/data/lib/Lib/test/test_mutants.py +285 -0
  631. data/lib/rubyfox/server/data/lib/Lib/test/test_netrc.py +42 -0
  632. data/lib/rubyfox/server/data/lib/Lib/test/test_new.py +108 -0
  633. data/lib/rubyfox/server/data/lib/Lib/test/test_nis.py +32 -0
  634. data/lib/rubyfox/server/data/lib/Lib/test/test_ntpath.py +114 -0
  635. data/lib/rubyfox/server/data/lib/Lib/test/test_opcodes.py +65 -0
  636. data/lib/rubyfox/server/data/lib/Lib/test/test_openpty.py +21 -0
  637. data/lib/rubyfox/server/data/lib/Lib/test/test_operations.py +475 -0
  638. data/lib/rubyfox/server/data/lib/Lib/test/test_operator.py +218 -0
  639. data/lib/rubyfox/server/data/lib/Lib/test/test_os.py +187 -0
  640. data/lib/rubyfox/server/data/lib/Lib/test/test_parser.py +383 -0
  641. data/lib/rubyfox/server/data/lib/Lib/test/test_pep247.py +50 -0
  642. data/lib/rubyfox/server/data/lib/Lib/test/test_pickle.py +40 -0
  643. data/lib/rubyfox/server/data/lib/Lib/test/test_pkg.py +259 -0
  644. data/lib/rubyfox/server/data/lib/Lib/test/test_pkgimport.py +84 -0
  645. data/lib/rubyfox/server/data/lib/Lib/test/test_poll.py +3 -0
  646. data/lib/rubyfox/server/data/lib/Lib/test/test_popen2.py +72 -0
  647. data/lib/rubyfox/server/data/lib/Lib/test/test_posixpath.py +40 -0
  648. data/lib/rubyfox/server/data/lib/Lib/test/test_pow.py +107 -0
  649. data/lib/rubyfox/server/data/lib/Lib/test/test_pprint.py +104 -0
  650. data/lib/rubyfox/server/data/lib/Lib/test/test_profile.py +86 -0
  651. data/lib/rubyfox/server/data/lib/Lib/test/test_profilehooks.py +360 -0
  652. data/lib/rubyfox/server/data/lib/Lib/test/test_pty.py +98 -0
  653. data/lib/rubyfox/server/data/lib/Lib/test/test_pwd.py +71 -0
  654. data/lib/rubyfox/server/data/lib/Lib/test/test_pyclbr.py +154 -0
  655. data/lib/rubyfox/server/data/lib/Lib/test/test_pyexpat.py +202 -0
  656. data/lib/rubyfox/server/data/lib/Lib/test/test_queue.py +158 -0
  657. data/lib/rubyfox/server/data/lib/Lib/test/test_quopri.py +157 -0
  658. data/lib/rubyfox/server/data/lib/Lib/test/test_random.py +19 -0
  659. data/lib/rubyfox/server/data/lib/Lib/test/test_re.py +304 -0
  660. data/lib/rubyfox/server/data/lib/Lib/test/test_regex.py +113 -0
  661. data/lib/rubyfox/server/data/lib/Lib/test/test_repr.py +278 -0
  662. data/lib/rubyfox/server/data/lib/Lib/test/test_rfc822.py +211 -0
  663. data/lib/rubyfox/server/data/lib/Lib/test/test_rgbimg.py +63 -0
  664. data/lib/rubyfox/server/data/lib/Lib/test/test_richcmp.py +261 -0
  665. data/lib/rubyfox/server/data/lib/Lib/test/test_rotor.py +28 -0
  666. data/lib/rubyfox/server/data/lib/Lib/test/test_sax.py +727 -0
  667. data/lib/rubyfox/server/data/lib/Lib/test/test_scope.py +530 -0
  668. data/lib/rubyfox/server/data/lib/Lib/test/test_select.py +228 -0
  669. data/lib/rubyfox/server/data/lib/Lib/test/test_select_new.py +229 -0
  670. data/lib/rubyfox/server/data/lib/Lib/test/test_sets.py +793 -0
  671. data/lib/rubyfox/server/data/lib/Lib/test/test_sgmllib.py +314 -0
  672. data/lib/rubyfox/server/data/lib/Lib/test/test_sha.py +52 -0
  673. data/lib/rubyfox/server/data/lib/Lib/test/test_signal.py +66 -0
  674. data/lib/rubyfox/server/data/lib/Lib/test/test_socket.py +1116 -0
  675. data/lib/rubyfox/server/data/lib/Lib/test/test_socket_ssl.py +27 -0
  676. data/lib/rubyfox/server/data/lib/Lib/test/test_socketserver.py +165 -0
  677. data/lib/rubyfox/server/data/lib/Lib/test/test_sre.py +434 -0
  678. data/lib/rubyfox/server/data/lib/Lib/test/test_str2unicode.py +90 -0
  679. data/lib/rubyfox/server/data/lib/Lib/test/test_strftime.py +146 -0
  680. data/lib/rubyfox/server/data/lib/Lib/test/test_string.py +223 -0
  681. data/lib/rubyfox/server/data/lib/Lib/test/test_strop.py +133 -0
  682. data/lib/rubyfox/server/data/lib/Lib/test/test_struct.py +441 -0
  683. data/lib/rubyfox/server/data/lib/Lib/test/test_structseq.py +28 -0
  684. data/lib/rubyfox/server/data/lib/Lib/test/test_subclasses.py +204 -0
  685. data/lib/rubyfox/server/data/lib/Lib/test/test_sunaudiodev.py +28 -0
  686. data/lib/rubyfox/server/data/lib/Lib/test/test_sundry.py +102 -0
  687. data/lib/rubyfox/server/data/lib/Lib/test/test_support.py +265 -0
  688. data/lib/rubyfox/server/data/lib/Lib/test/test_symtable.py +8 -0
  689. data/lib/rubyfox/server/data/lib/Lib/test/test_tempfile.py +10 -0
  690. data/lib/rubyfox/server/data/lib/Lib/test/test_thread.py +116 -0
  691. data/lib/rubyfox/server/data/lib/Lib/test/test_threaded_import.py +56 -0
  692. data/lib/rubyfox/server/data/lib/Lib/test/test_threadedtempfile.py +86 -0
  693. data/lib/rubyfox/server/data/lib/Lib/test/test_threading.py +55 -0
  694. data/lib/rubyfox/server/data/lib/Lib/test/test_time.py +47 -0
  695. data/lib/rubyfox/server/data/lib/Lib/test/test_timing.py +21 -0
  696. data/lib/rubyfox/server/data/lib/Lib/test/test_tokenize.py +9 -0
  697. data/lib/rubyfox/server/data/lib/Lib/test/test_trace.py +219 -0
  698. data/lib/rubyfox/server/data/lib/Lib/test/test_traceback.py +49 -0
  699. data/lib/rubyfox/server/data/lib/Lib/test/test_types.py +762 -0
  700. data/lib/rubyfox/server/data/lib/Lib/test/test_ucn.py +113 -0
  701. data/lib/rubyfox/server/data/lib/Lib/test/test_unary.py +58 -0
  702. data/lib/rubyfox/server/data/lib/Lib/test/test_unicode.py +815 -0
  703. data/lib/rubyfox/server/data/lib/Lib/test/test_unicode_file.py +95 -0
  704. data/lib/rubyfox/server/data/lib/Lib/test/test_unicodedata.py +125 -0
  705. data/lib/rubyfox/server/data/lib/Lib/test/test_unpack.py +105 -0
  706. data/lib/rubyfox/server/data/lib/Lib/test/test_urllib.py +109 -0
  707. data/lib/rubyfox/server/data/lib/Lib/test/test_urllib2.py +31 -0
  708. data/lib/rubyfox/server/data/lib/Lib/test/test_urlparse.py +94 -0
  709. data/lib/rubyfox/server/data/lib/Lib/test/test_userdict.py +120 -0
  710. data/lib/rubyfox/server/data/lib/Lib/test/test_userlist.py +269 -0
  711. data/lib/rubyfox/server/data/lib/Lib/test/test_userstring.py +43 -0
  712. data/lib/rubyfox/server/data/lib/Lib/test/test_uu.py +158 -0
  713. data/lib/rubyfox/server/data/lib/Lib/test/test_wave.py +34 -0
  714. data/lib/rubyfox/server/data/lib/Lib/test/test_weakref.py +573 -0
  715. data/lib/rubyfox/server/data/lib/Lib/test/test_winreg.py +151 -0
  716. data/lib/rubyfox/server/data/lib/Lib/test/test_winsound.py +6 -0
  717. data/lib/rubyfox/server/data/lib/Lib/test/test_xmllib.py +35 -0
  718. data/lib/rubyfox/server/data/lib/Lib/test/test_xmlrpc.py +37 -0
  719. data/lib/rubyfox/server/data/lib/Lib/test/test_xreadline.py +43 -0
  720. data/lib/rubyfox/server/data/lib/Lib/test/test_zipfile.py +78 -0
  721. data/lib/rubyfox/server/data/lib/Lib/test/test_zlib.py +482 -0
  722. data/lib/rubyfox/server/data/lib/Lib/test/testall.py +43 -0
  723. data/lib/rubyfox/server/data/lib/Lib/test/testcodec.py +48 -0
  724. data/lib/rubyfox/server/data/lib/Lib/test/testimg.uue +1170 -0
  725. data/lib/rubyfox/server/data/lib/Lib/test/testimgr.uue +1170 -0
  726. data/lib/rubyfox/server/data/lib/Lib/test/testrgb.uue +971 -0
  727. data/lib/rubyfox/server/data/lib/Lib/test/tokenize_tests.py +175 -0
  728. data/lib/rubyfox/server/data/lib/Lib/test/whrandom.py +96 -0
  729. data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/dbextstest.py +266 -0
  730. data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/jndi.py +33 -0
  731. data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/runner.py +204 -0
  732. data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/sptest.py +227 -0
  733. data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/test.xml +363 -0
  734. data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/test_zxjdbc_dbapi20.py +26 -0
  735. data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/zxtest.py +1242 -0
  736. data/lib/rubyfox/server/data/lib/Lib/this.py +28 -0
  737. data/lib/rubyfox/server/data/lib/Lib/threading.py +698 -0
  738. data/lib/rubyfox/server/data/lib/Lib/token$py.class +0 -0
  739. data/lib/rubyfox/server/data/lib/Lib/token.py +140 -0
  740. data/lib/rubyfox/server/data/lib/Lib/tokenize$py.class +0 -0
  741. data/lib/rubyfox/server/data/lib/Lib/tokenize.py +287 -0
  742. data/lib/rubyfox/server/data/lib/Lib/traceback$py.class +0 -0
  743. data/lib/rubyfox/server/data/lib/Lib/traceback.py +301 -0
  744. data/lib/rubyfox/server/data/lib/Lib/tzparse.py +98 -0
  745. data/lib/rubyfox/server/data/lib/Lib/unittest.py +723 -0
  746. data/lib/rubyfox/server/data/lib/Lib/urllib.py +1465 -0
  747. data/lib/rubyfox/server/data/lib/Lib/urllib2.py +1144 -0
  748. data/lib/rubyfox/server/data/lib/Lib/urlparse.py +276 -0
  749. data/lib/rubyfox/server/data/lib/Lib/user.py +45 -0
  750. data/lib/rubyfox/server/data/lib/Lib/uu.py +195 -0
  751. data/lib/rubyfox/server/data/lib/Lib/warnings$py.class +0 -0
  752. data/lib/rubyfox/server/data/lib/Lib/warnings.py +258 -0
  753. data/lib/rubyfox/server/data/lib/Lib/weakref.py +280 -0
  754. data/lib/rubyfox/server/data/lib/Lib/whichdb.py +87 -0
  755. data/lib/rubyfox/server/data/lib/Lib/whrandom.py +140 -0
  756. data/lib/rubyfox/server/data/lib/Lib/xdrlib.py +285 -0
  757. data/lib/rubyfox/server/data/lib/Lib/xml/FtCore.py +58 -0
  758. data/lib/rubyfox/server/data/lib/Lib/xml/Uri.py +380 -0
  759. data/lib/rubyfox/server/data/lib/Lib/xml/__init__.py +41 -0
  760. data/lib/rubyfox/server/data/lib/Lib/xml/dom/MessageSource.py +54 -0
  761. data/lib/rubyfox/server/data/lib/Lib/xml/dom/NodeFilter.py +27 -0
  762. data/lib/rubyfox/server/data/lib/Lib/xml/dom/__init__.py +232 -0
  763. data/lib/rubyfox/server/data/lib/Lib/xml/dom/domreg.py +99 -0
  764. data/lib/rubyfox/server/data/lib/Lib/xml/dom/minicompat.py +184 -0
  765. data/lib/rubyfox/server/data/lib/Lib/xml/dom/minidom.py +1943 -0
  766. data/lib/rubyfox/server/data/lib/Lib/xml/dom/pulldom.py +350 -0
  767. data/lib/rubyfox/server/data/lib/Lib/xml/dom/xmlbuilder.py +388 -0
  768. data/lib/rubyfox/server/data/lib/Lib/xml/sax/__init__.py +102 -0
  769. data/lib/rubyfox/server/data/lib/Lib/xml/sax/_exceptions.py +127 -0
  770. data/lib/rubyfox/server/data/lib/Lib/xml/sax/drivers2/__init__.py +1 -0
  771. data/lib/rubyfox/server/data/lib/Lib/xml/sax/drivers2/drv_javasax.py +333 -0
  772. data/lib/rubyfox/server/data/lib/Lib/xml/sax/handler.py +345 -0
  773. data/lib/rubyfox/server/data/lib/Lib/xml/sax/saxlib.py +430 -0
  774. data/lib/rubyfox/server/data/lib/Lib/xml/sax/saxutils.py +813 -0
  775. data/lib/rubyfox/server/data/lib/Lib/xml/sax/xmlreader.py +378 -0
  776. data/lib/rubyfox/server/data/lib/Lib/xmllib.py +926 -0
  777. data/lib/rubyfox/server/data/lib/Lib/xmlrpclib.py +1019 -0
  778. data/lib/rubyfox/server/data/lib/Lib/zipfile.py +586 -0
  779. data/lib/rubyfox/server/data/lib/Lib/zlib.py +156 -0
  780. data/lib/rubyfox/server/data/lib/boot.jar +0 -0
  781. data/lib/rubyfox/server/data/lib/cachedir/.keep +0 -0
  782. data/lib/rubyfox/server/data/lib/commons-beanutils-1.7.0.jar +0 -0
  783. data/lib/rubyfox/server/data/lib/commons-collections-3.2.1.jar +0 -0
  784. data/lib/rubyfox/server/data/lib/commons-dbcp-1.4.jar +0 -0
  785. data/lib/rubyfox/server/data/lib/commons-io-1.4.jar +0 -0
  786. data/lib/rubyfox/server/data/lib/commons-lang-2.4.jar +0 -0
  787. data/lib/rubyfox/server/data/lib/commons-logging-1.1.1.jar +0 -0
  788. data/lib/rubyfox/server/data/lib/commons-pool-1.5.4.jar +0 -0
  789. data/lib/rubyfox/server/data/lib/commons-vfs-1.0.jar +0 -0
  790. data/lib/rubyfox/server/data/lib/ezmorph-1.0.6.jar +0 -0
  791. data/lib/rubyfox/server/data/lib/httpclient-4.0.3.jar +0 -0
  792. data/lib/rubyfox/server/data/lib/httpcore-4.0.1.jar +0 -0
  793. data/lib/rubyfox/server/data/lib/imap.jar +0 -0
  794. data/lib/rubyfox/server/data/lib/jconsole/COPYING.txt +504 -0
  795. data/lib/rubyfox/server/data/lib/jconsole/bug_test_case.py +49 -0
  796. data/lib/rubyfox/server/data/lib/jconsole/console$py.class +0 -0
  797. data/lib/rubyfox/server/data/lib/jconsole/console.py +439 -0
  798. data/lib/rubyfox/server/data/lib/jconsole/history$py.class +0 -0
  799. data/lib/rubyfox/server/data/lib/jconsole/history.py +82 -0
  800. data/lib/rubyfox/server/data/lib/jconsole/history_test_case.py +133 -0
  801. data/lib/rubyfox/server/data/lib/jconsole/introspect$py.class +0 -0
  802. data/lib/rubyfox/server/data/lib/jconsole/introspect.py +373 -0
  803. data/lib/rubyfox/server/data/lib/jconsole/introspect_test_case.py +19 -0
  804. data/lib/rubyfox/server/data/lib/jconsole/issue_17_test_case.py +36 -0
  805. data/lib/rubyfox/server/data/lib/jconsole/jintrospect$py.class +0 -0
  806. data/lib/rubyfox/server/data/lib/jconsole/jintrospect.py +316 -0
  807. data/lib/rubyfox/server/data/lib/jconsole/jintrospect_test_case.py +107 -0
  808. data/lib/rubyfox/server/data/lib/jconsole/popup$py.class +0 -0
  809. data/lib/rubyfox/server/data/lib/jconsole/popup.py +178 -0
  810. data/lib/rubyfox/server/data/lib/jconsole/run_tests.py +8 -0
  811. data/lib/rubyfox/server/data/lib/jconsole/static_test_case.py +36 -0
  812. data/lib/rubyfox/server/data/lib/jconsole/testcase.py +38 -0
  813. data/lib/rubyfox/server/data/lib/jconsole/tip$py.class +0 -0
  814. data/lib/rubyfox/server/data/lib/jconsole/tip.py +47 -0
  815. data/lib/rubyfox/server/data/lib/jmx-util-1.2.3.jar +0 -0
  816. data/lib/rubyfox/server/data/lib/joda-time-1.6.jar +0 -0
  817. data/lib/rubyfox/server/data/lib/js.jar +0 -0
  818. data/lib/rubyfox/server/data/lib/json-lib-2.2.3-jdk15.jar +0 -0
  819. data/lib/rubyfox/server/data/lib/jython.jar +0 -0
  820. data/lib/rubyfox/server/data/lib/log4j-1.2.15.jar +0 -0
  821. data/lib/rubyfox/server/data/lib/logs-backup-app.jar +0 -0
  822. data/lib/rubyfox/server/data/lib/mailapi.jar +0 -0
  823. data/lib/rubyfox/server/data/lib/pop3.jar +0 -0
  824. data/lib/rubyfox/server/data/lib/scala-library.jar +0 -0
  825. data/lib/rubyfox/server/data/lib/sfs2x-admin.jar +0 -0
  826. data/lib/rubyfox/server/data/lib/sfs2x-core.jar +0 -0
  827. data/lib/rubyfox/server/data/lib/sfs2x-util.jar +0 -0
  828. data/lib/rubyfox/server/data/lib/sfs2x.jar +0 -0
  829. data/lib/rubyfox/server/data/lib/slf4j-api-1.5.10.jar +0 -0
  830. data/lib/rubyfox/server/data/lib/slf4j-log4j12.jar +0 -0
  831. data/lib/rubyfox/server/data/lib/smtp.jar +0 -0
  832. data/lib/rubyfox/server/data/lib/terracotta-api-1.1.1.jar +0 -0
  833. data/lib/rubyfox/server/data/lib/ws-engine.jar +0 -0
  834. data/lib/rubyfox/server/data/lib/xpp3_min-1.1.4c.jar +0 -0
  835. data/lib/rubyfox/server/data/lib/xstream-1.3.1.jar +0 -0
  836. data/lib/rubyfox/server/data/logs/.keep +0 -0
  837. data/lib/rubyfox/server/data/logs/bluebox/.keep +0 -0
  838. data/lib/rubyfox/server/data/logs/boot/.keep +0 -0
  839. data/lib/rubyfox/server/data/logs/http/.keep +0 -0
  840. data/lib/rubyfox/server/data/logs/smartfox.log +295 -0
  841. data/lib/rubyfox/server/data/root/.keep +0 -0
  842. data/lib/rubyfox/server/data/root/_css_/default.css +170 -0
  843. data/lib/rubyfox/server/data/root/_css_/reset.css +49 -0
  844. data/lib/rubyfox/server/data/root/_images_/background_gradient.png +0 -0
  845. data/lib/rubyfox/server/data/root/_images_/background_logo.png +0 -0
  846. data/lib/rubyfox/server/data/root/_images_/favicon.png +0 -0
  847. data/lib/rubyfox/server/data/root/_images_/logo_smartfoxserver.png +0 -0
  848. data/lib/rubyfox/server/data/root/admin/.keep +0 -0
  849. data/lib/rubyfox/server/data/root/admin/AdminTool.html +108 -0
  850. data/lib/rubyfox/server/data/root/admin/AdminTool.swf +0 -0
  851. data/lib/rubyfox/server/data/root/admin/ReleaseNotes.txt +29 -0
  852. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/adobeFlashPlayer.png +0 -0
  853. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/advanced.png +0 -0
  854. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/banManager.png +0 -0
  855. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/bannedIPs.png +0 -0
  856. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/bannedUsernames.png +0 -0
  857. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/bookmarks.png +0 -0
  858. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/bootLog.png +0 -0
  859. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/buddyList.png +0 -0
  860. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/buddyProperties.png +0 -0
  861. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/connection.png +0 -0
  862. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/databaseManager.png +0 -0
  863. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/floodFilter.png +0 -0
  864. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/gameSettings.png +0 -0
  865. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/general.png +0 -0
  866. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/globalServerStatus.png +0 -0
  867. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/iPFilter.png +0 -0
  868. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/jVMSettings.png +0 -0
  869. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/logsDownload.png +0 -0
  870. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/mailer.png +0 -0
  871. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/permissionsAndEvents.png +0 -0
  872. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/privilegeManager.png +0 -0
  873. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/remoteAdmin.png +0 -0
  874. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/roomExtension.png +0 -0
  875. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/roomVariables.png +0 -0
  876. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/roomsAndGroups.png +0 -0
  877. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/runtimeLog.png +0 -0
  878. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/runtimeRoomSettings.png +0 -0
  879. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/runtimeUserSettings.png +0 -0
  880. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/runtimeZoneSettings.png +0 -0
  881. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/systemQueueStatus.png +0 -0
  882. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/userManagement.png +0 -0
  883. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/userVariables.png +0 -0
  884. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/usersTraffic.png +0 -0
  885. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/webServer.png +0 -0
  886. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/wordsFilter.png +0 -0
  887. data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/zoneExtension.png +0 -0
  888. data/lib/rubyfox/server/data/root/admin/index.html +108 -0
  889. data/lib/rubyfox/server/data/root/admin/modules/BanManager/BanManager.swf +0 -0
  890. data/lib/rubyfox/server/data/root/admin/modules/BanManager/icon.png +0 -0
  891. data/lib/rubyfox/server/data/root/admin/modules/BlueBoxMonitor/BlueBoxMonitor.swf +0 -0
  892. data/lib/rubyfox/server/data/root/admin/modules/BlueBoxMonitor/icon.png +0 -0
  893. data/lib/rubyfox/server/data/root/admin/modules/LicenseManager/LicenseManager.swf +0 -0
  894. data/lib/rubyfox/server/data/root/admin/modules/LicenseManager/icon.png +0 -0
  895. data/lib/rubyfox/server/data/root/admin/modules/LogViewer/LogViewer.swf +0 -0
  896. data/lib/rubyfox/server/data/root/admin/modules/LogViewer/icon.png +0 -0
  897. data/lib/rubyfox/server/data/root/admin/modules/RuntimeStatistics/RuntimeStatistics.swf +0 -0
  898. data/lib/rubyfox/server/data/root/admin/modules/RuntimeStatistics/icon.png +0 -0
  899. data/lib/rubyfox/server/data/root/admin/modules/ServerConfigurator/ServerConfigurator.swf +0 -0
  900. data/lib/rubyfox/server/data/root/admin/modules/ServerConfigurator/icon.png +0 -0
  901. data/lib/rubyfox/server/data/root/admin/modules/ZoneConfigurator/ZoneConfigurator.swf +0 -0
  902. data/lib/rubyfox/server/data/root/admin/modules/ZoneConfigurator/icon.png +0 -0
  903. data/lib/rubyfox/server/data/root/admin/modules/ZoneMonitor/ZoneMonitor.swf +0 -0
  904. data/lib/rubyfox/server/data/root/admin/modules/ZoneMonitor/icon.png +0 -0
  905. data/lib/rubyfox/server/data/root/admin/modules/config.xml +12 -0
  906. data/lib/rubyfox/server/data/root/admin/playerProductInstall.swf +0 -0
  907. data/lib/rubyfox/server/data/root/admin/swfobject.js +777 -0
  908. data/lib/rubyfox/server/data/root/crossdomain.xml +6 -0
  909. data/lib/rubyfox/server/data/root/index.html +63 -0
  910. data/lib/rubyfox/server/data/sfs2x-service +435 -0
  911. data/lib/rubyfox/server/data/sfs2x-service.vmoptions +5 -0
  912. data/lib/rubyfox/server/data/sfs2x.sh +12 -0
  913. data/lib/rubyfox/server/data/www/.keep +0 -0
  914. data/lib/rubyfox/server/data/www/BlueBox.war +0 -0
  915. data/lib/rubyfox/server/data/www/root/_css_/default.css +170 -0
  916. data/lib/rubyfox/server/data/www/root/_css_/reset.css +49 -0
  917. data/lib/rubyfox/server/data/www/root/_images_/background_gradient.png +0 -0
  918. data/lib/rubyfox/server/data/www/root/_images_/background_logo.png +0 -0
  919. data/lib/rubyfox/server/data/www/root/_images_/favicon.png +0 -0
  920. data/lib/rubyfox/server/data/www/root/_images_/logo_smartfoxserver.png +0 -0
  921. data/lib/rubyfox/server/data/www/root/admin/.keep +0 -0
  922. data/lib/rubyfox/server/data/www/root/admin/AdminTool.html +108 -0
  923. data/lib/rubyfox/server/data/www/root/admin/AdminTool.swf +0 -0
  924. data/lib/rubyfox/server/data/www/root/admin/ReleaseNotes.txt +63 -0
  925. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/adobeFlashPlayer.png +0 -0
  926. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/advanced.png +0 -0
  927. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/banManager.png +0 -0
  928. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/bannedIPs.png +0 -0
  929. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/bannedUsernames.png +0 -0
  930. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/bookmarks.png +0 -0
  931. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/bootLog.png +0 -0
  932. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/buddyList.png +0 -0
  933. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/buddyProperties.png +0 -0
  934. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/connection.png +0 -0
  935. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/databaseManager.png +0 -0
  936. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/floodFilter.png +0 -0
  937. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/gameSettings.png +0 -0
  938. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/general.png +0 -0
  939. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/globalServerStatus.png +0 -0
  940. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/hTML5WebSockets.png +0 -0
  941. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/iPFilter.png +0 -0
  942. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/jVMSettings.png +0 -0
  943. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/logsDownload.png +0 -0
  944. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/mailer.png +0 -0
  945. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/permissionsAndEvents.png +0 -0
  946. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/privilegeManager.png +0 -0
  947. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/remoteAdmin.png +0 -0
  948. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/roomExtension.png +0 -0
  949. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/roomVariables.png +0 -0
  950. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/roomsAndGroups.png +0 -0
  951. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/runtimeLog.png +0 -0
  952. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/runtimeRoomSettings.png +0 -0
  953. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/runtimeUserSettings.png +0 -0
  954. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/runtimeZoneSettings.png +0 -0
  955. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/systemQueueStatus.png +0 -0
  956. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/userManagement.png +0 -0
  957. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/userVariables.png +0 -0
  958. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/usersTraffic.png +0 -0
  959. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/webServer.png +0 -0
  960. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/wordsFilter.png +0 -0
  961. data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/zoneExtension.png +0 -0
  962. data/lib/rubyfox/server/data/www/root/admin/index.html +108 -0
  963. data/lib/rubyfox/server/data/www/root/admin/modules/BanManager/BanManager.swf +0 -0
  964. data/lib/rubyfox/server/data/www/root/admin/modules/BanManager/icon.png +0 -0
  965. data/lib/rubyfox/server/data/www/root/admin/modules/BlueBoxMonitor/BlueBoxMonitor.swf +0 -0
  966. data/lib/rubyfox/server/data/www/root/admin/modules/BlueBoxMonitor/icon.png +0 -0
  967. data/lib/rubyfox/server/data/www/root/admin/modules/Dashboard/Dashboard.swf +0 -0
  968. data/lib/rubyfox/server/data/www/root/admin/modules/Dashboard/icon.png +0 -0
  969. data/lib/rubyfox/server/data/www/root/admin/modules/LicenseManager/LicenseManager.swf +0 -0
  970. data/lib/rubyfox/server/data/www/root/admin/modules/LicenseManager/icon.png +0 -0
  971. data/lib/rubyfox/server/data/www/root/admin/modules/LogViewer/LogViewer.swf +0 -0
  972. data/lib/rubyfox/server/data/www/root/admin/modules/LogViewer/icon.png +0 -0
  973. data/lib/rubyfox/server/data/www/root/admin/modules/RuntimeStatistics/RuntimeStatistics.swf +0 -0
  974. data/lib/rubyfox/server/data/www/root/admin/modules/RuntimeStatistics/icon.png +0 -0
  975. data/lib/rubyfox/server/data/www/root/admin/modules/ServerConfigurator/ServerConfigurator.swf +0 -0
  976. data/lib/rubyfox/server/data/www/root/admin/modules/ServerConfigurator/icon.png +0 -0
  977. data/lib/rubyfox/server/data/www/root/admin/modules/ZoneConfigurator/ZoneConfigurator.swf +0 -0
  978. data/lib/rubyfox/server/data/www/root/admin/modules/ZoneConfigurator/icon.png +0 -0
  979. data/lib/rubyfox/server/data/www/root/admin/modules/ZoneMonitor/ZoneMonitor.swf +0 -0
  980. data/lib/rubyfox/server/data/www/root/admin/modules/ZoneMonitor/icon.png +0 -0
  981. data/lib/rubyfox/server/data/www/root/admin/modules/config.xml +12 -0
  982. data/lib/rubyfox/server/data/www/root/admin/playerProductInstall.swf +0 -0
  983. data/lib/rubyfox/server/data/www/root/admin/swfobject.js +777 -0
  984. data/lib/rubyfox/server/data/www/root/crossdomain.xml +6 -0
  985. data/lib/rubyfox/server/data/www/root/examples/.keep +0 -0
  986. data/lib/rubyfox/server/data/www/root/examples/index.html +43 -0
  987. data/lib/rubyfox/server/data/www/root/index.html +63 -0
  988. data/lib/rubyfox/server/data/zones/.keep +0 -0
  989. data/lib/rubyfox/server/environment.rb +31 -0
  990. data/lib/rubyfox/server/version.rb +5 -0
  991. data/lib/rubyfox/server.rb +9 -0
  992. data/rubyfox-server.gemspec +22 -0
  993. 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