[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [bridgedb/master] Add leekspin dependency; modify test_bridgedb and bridgedb.runner apropos.
commit 6d991ba844be61f944b13ca4a7077c03464406a0
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date: Mon Mar 24 03:12:52 2014 +0000
Add leekspin dependency; modify test_bridgedb and bridgedb.runner apropos.
---
.travis.yml | 4 ++--
lib/bridgedb/runner.py | 2 +-
lib/bridgedb/test/test_bridgedb.py | 12 +++++++++---
setup.py | 8 ++++----
4 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 8d8bfcf..902c3b4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -27,8 +27,8 @@ python:
- "2.7"
install:
- - pip install -r requirements.txt --use-mirrors
- - pip install coverage==3.7 coveralls==0.3 sure==1.2.2 --use-mirrors
+ - pip install -r requirements.txt
+ - pip install --no-use-wheel leekspin==0.1.1 coverage==3.7 coveralls==0.3 sure==1.2.2
- make install
script:
diff --git a/lib/bridgedb/runner.py b/lib/bridgedb/runner.py
index 8c641f6..d067bd9 100644
--- a/lib/bridgedb/runner.py
+++ b/lib/bridgedb/runner.py
@@ -45,7 +45,7 @@ def generateDescriptors(count=None, rundir=None):
proc = None
statuscode = 0
- script = 'gen_bridge_descriptors'
+ script = 'leekspin'
rundir = rundir if os.path.isdir(rundir) else None
count = count if count else 3
try:
diff --git a/lib/bridgedb/test/test_bridgedb.py b/lib/bridgedb/test/test_bridgedb.py
index 3d21080..5dc890d 100644
--- a/lib/bridgedb/test/test_bridgedb.py
+++ b/lib/bridgedb/test/test_bridgedb.py
@@ -75,12 +75,18 @@ class BridgeDBCliTest(unittest.TestCase):
bridgedbScript = bridgedbScript[0]
print("Running bridgedb script %r..." % bridgedbScript)
+ os.chdir(runDir) # we have to do this to get files to end up there
print("Running `bridgedb mock' to generate mock bridge descriptors...")
- mockProc = Popen([bridgedbScript, 'mock',
- '-n', '50',
- '-r', runDir])
+ mockProc = Popen([bridgedbScript, 'mock', '-n', '50'])
mockProcCode = mockProc.wait()
print("`bridgedb mock' exited with status code %d" % int(mockProcCode))
+ os.chdir(here)
+
+ # See ticket #11216, cached-extrainfo* files should not be parsed
+ # cumulatively.
+ eidesc = pjoin(runDir, 'cached-extrainfo')
+ eindesc = pjoin(runDir, 'cached-extrainfo.new')
+ self.doCopyFile(eindesc, eidesc, 'duplicated cached-extrainfo(.new)')
print("Running `bridgedb' to test server startups...")
bridgedbProc = Popen([bridgedbScript, '-r', runDir])
diff --git a/setup.py b/setup.py
index 5ec2d79..d859f87 100644
--- a/setup.py
+++ b/setup.py
@@ -274,10 +274,10 @@ setuptools.setup(
packages=['bridgedb',
'bridgedb.parse',
'bridgedb.test'],
- scripts=['scripts/bridgedb',
- 'scripts/gen_bridge_descriptors'],
- extras_require={'test': ["sure==0.4.5",
- "coverage==3.6"]},
+ scripts=['scripts/bridgedb'],
+ extras_require={'test': ["sure==1.2.2",
+ "coverage==3.7",
+ "leekspin==0.1.1"]},
zip_safe=False,
cmdclass=get_cmdclass(),
include_package_data=True,
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits