chiark
/
gitweb
/
~ianmdlvl
/
fdroidserver.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e58ad33
)
allow index.TestCase to work when run using any path
author
Hans-Christoph Steiner
<hans@eds.org>
Mon, 3 Apr 2017 17:19:37 +0000
(19:19 +0200)
committer
Hans-Christoph Steiner
<hans@eds.org>
Mon, 3 Apr 2017 18:24:21 +0000
(20:24 +0200)
tests/index.TestCase
patch
|
blob
|
history
diff --git
a/tests/index.TestCase
b/tests/index.TestCase
index bbfac7bf331c95bf1cda2774f3d8735e8154fb11..780da775e6ba93e65c5aeea64c85399af11eb33b 100755
(executable)
--- a/
tests/index.TestCase
+++ b/
tests/index.TestCase
@@
-1,9
+1,18
@@
#!/usr/bin/env python3
+
+import inspect
import optparse
import os
+import sys
import unittest
import zipfile
+localmodule = os.path.realpath(
+ os.path.join(os.path.dirname(inspect.getfile(inspect.currentframe())), '..'))
+print('localmodule: ' + localmodule)
+if localmodule not in sys.path:
+ sys.path.insert(0, localmodule)
+
import fdroidserver.common
import fdroidserver.index
import fdroidserver.signindex