140 Commits

Author SHA1 Message Date
Kelsey Karin Hawley
e3116482d4 Merge pull request #4 from nlevitt/test_dump-anydbm
small fixes to kelsey's tests
2014-01-07 11:14:08 -08:00
Noah Levitt
f69ec424fb minor cleanup 2014-01-06 17:22:49 -08:00
Noah Levitt
b4a7a7fa5f remove warcprox from deps, because it downloads and installs from pypi instead of using local checkout 2014-01-06 17:22:36 -08:00
Noah Levitt
e89fba4332 logic fix 2014-01-06 17:22:00 -08:00
Kelsey Hawley
b6ea681c2b changed file creation and deletion to use temporaryfile. Still needed to use os to delete the 'extra' files that ndbm & dumbdbm created. Also did not explicitly state the file name in checking the output statements, as now they are random everytime. 2014-01-02 18:18:46 -08:00
Kelsey Hawley
1b69aea7ed removed the string splicing and replaced with one clear assert statement based on the script output for each test. simplifies and clarifies the test 2014-01-02 17:05:45 -08:00
Kelsey Hawley
4b0ab0ff72 updated file to PEP 8, as editor was complaining, and tabs are generally bad 2014-01-02 16:29:15 -08:00
Kelsey Hawley
39fb1c75ba added py27 & py32 back into envlist for tox to run against 2013-12-31 13:47:50 -08:00
Kelsey Hawley
e6606c67fa committing updates to tox.ini file for use with tox 2013-12-31 12:34:09 -08:00
Kelsey Hawley
d643be1c8c moved dump-anydbm test file to be in the existing test folder, as proximity to dump-anydbm script is not necessary 2013-12-20 14:01:42 -08:00
Kelsey Hawley
12e00e3060 Merge branch 'master' of https://github.com/internetarchive/warcprox
* 'master' of https://github.com/internetarchive/warcprox:
  oops, adding missing comma
  add some classifiers
  since we depend on warctools trunk now, update the readme, and update the version number, so we can push latest to pypi
2013-12-20 13:54:15 -08:00
Kelsey Hawley
6a129fed34 corrected the import of python 3 modules. Updated print statements to function form to work correctly with python 2 & 3. Also decoded the subprocess output into unicode string for splicing and processing of keys 2013-12-20 13:51:34 -08:00
Kelsey Hawley
48a2db509f updated string printing to be consistent between python 2 & 3. Previously, python 3 would print the db key & values as byte code, while python 2 inherently ignores this when printing. Now the stdout is the same in both versions. 2013-12-20 13:47:41 -08:00
Kelsey Hawley
44ea56d65c addressed odd python 3 issue where whichdb cannot recognize an ndbm unless that module has been previously imported. Also removed file_location variable as it wasn't being used afterall 2013-12-20 13:43:49 -08:00
Noah Levitt
3bc4294227 oops, adding missing comma 2013-12-19 17:08:13 -08:00
Noah Levitt
115b7c03ee add some classifiers 2013-12-19 17:03:40 -08:00
Noah Levitt
f07437f64d since we depend on warctools trunk now, update the readme, and update the version number, so we can push latest to pypi 2013-12-19 16:48:28 -08:00
Kelsey Hawley
e01de5aad3 Merge branch 'master' of https://github.com/khawley/warcprox
* 'master' of https://github.com/khawley/warcprox:
  ensure request headers always use \r\n (some servers barf if not, e.g. http://cleftomaniacsnyu.wix.com
2013-12-19 11:02:51 -08:00
Kelsey Hawley
f8549f69cc cleaned up tests and removed unnecessary testing of fixtures. Only test of dump-anydbm remain 2013-12-18 21:17:41 -08:00
Kelsey Hawley
43158fdce2 reconfigured dump-anydbm to check the output of whichdb instead of checking for file existence first. This helps bypass the issue of an ndbm database only be recognized without its extension. If which returns None, then the file does not exist, and if it returns '' then it cannot process it 2013-12-18 21:16:52 -08:00
Kelsey Hawley
d6cee750bc updating the test fixture for ndbm. whichdb needs the filename w/o '.db' to correctly identify and dbm.open does not the extension to read it 2013-12-18 18:23:15 -08:00
Kelsey Hawley
99d077b89c still having trouble gettting the ndbm module to correctly make an ndbm instead of bsd db. this fixture setup seems to work, tho bogglingly. It creates 2 files, one ndbm & the other bsd db. requires further investigation 2013-12-17 17:29:50 -08:00
Kelsey Hawley
c6cbda1187 updated test for dumbdbm. dump-anydbm cannot run any dubmdbm, the test now reflects that 2013-12-17 16:50:35 -08:00
Kelsey Hawley
4718cd7853 updated keys & vals to global predefined, added db type specification (for the differences between py2 & 3), finished up test for dump-anydbm with gdbm 2013-12-17 16:04:26 -08:00
Kelsey Hawley
efb96ee0c3 added test for dump-anydbm that uses module subprocess to run script 2013-12-17 15:35:23 -08:00
Kelsey Hawley
24a3437fda adapted reading for dumbdbm. also removed the '.dir' from the name being passed through. Not needed for whichdb or .open 2013-12-17 14:48:26 -08:00
Kelsey Hawley
0f48f6bed9 removed the mixed remove statement from dumbdbm in gdbm and used the appropriate filename remove 2013-12-17 14:38:45 -08:00
Kelsey Hawley
1ea6eb5b9a add dubmdbm fixture and recognition test 2013-12-17 14:33:31 -08:00
Kelsey Hawley
41836c86f8 added test to confirm correct number of keys in db, key exists, and key has correct value 2013-12-17 14:30:31 -08:00
Kelsey Hawley
7991640291 take advantage of teardown of fixture to delete temp db file 2013-12-17 14:27:14 -08:00
Kelsey Hawley
acc55ce266 create first test for gdbm fixture 2013-12-17 14:26:00 -08:00
Kelsey Hawley
2dd147c1c2 create first fixture for gdbm 2013-12-17 14:25:24 -08:00
Kelsey Hawley
043771ab25 initial commit, setting up for py 2 & 3 2013-12-17 14:23:34 -08:00
Noah Levitt
0cb0f0e448 ensure request headers always use \r\n (some servers barf if not, e.g. http://cleftomaniacsnyu.wix.com 2013-12-13 19:36:22 -08:00
Noah Levitt
e880deddb6 oops, fix dependency_links warctools github url 2013-12-13 06:02:14 +00:00
Noah Levitt
9041fe00e6 use hashlib.algorithms_guaranteed to replace missing hashlib.algorithms in python3 2013-12-12 21:59:43 -08:00
Noah Levitt
81974bb014 warctools mainline has the good stuff now 2013-12-12 21:28:25 -08:00
Noah Levitt
c220084704 travis ci and pypi badge thingies 2013-12-09 18:47:50 -08:00
Noah Levitt
f91986c1af maybe gdbm will work 2013-12-09 18:35:40 -08:00
Noah Levitt
2b5ab3b70a shorter CN for CA cert to avoid OpenSSL.crypto.Error: [('asn1 encoding routines', 'ASN1_mbstring_ncopy', 'string too long')] 2013-12-09 17:56:47 -08:00
Noah Levitt
313bc62bf1 gdbm not in pip, can't be listed as a requirement 2013-12-09 17:45:00 -08:00
Noah Levitt
0d617a927c tox (and travis ci?) were hiding the fact that the gdbm dependency was the problem 2013-12-07 00:28:56 -08:00
Noah Levitt
e9e152ca7d tox (and travis ci?) were hiding the fact that the gdbm dependency was the problem 2013-12-07 00:27:59 -08:00
Noah Levitt
965043324a not sure how to test travis ci without making a million commits 2013-12-06 17:14:01 -08:00
Noah Levitt
f2b501ca35 python3.3 http.client wants ProxyingRecord.readinto 2013-12-06 17:09:59 -08:00
Noah Levitt
b6774da603 more fiddling trying to get test runs to work with various invocation methods, esp travis 2013-12-06 16:50:02 -08:00
Noah Levitt
9c6c18d274 nose.collector wasn't working 2013-12-06 15:22:29 -08:00
Noah Levitt
1f0a894eba restructuredtext requires blank line before nested list :-\ 2013-12-04 17:51:55 -08:00
Noah Levitt
2dd9ecb718 not sure why tox wasn't working, but this fixes it 2013-12-04 17:50:55 -08:00
Noah Levitt
235e0dce45 update readme (and trigger travis ci build?) 2013-12-04 17:44:08 -08:00