summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2014-09-03 19:21:16 +0200
committerJan Pokorný <jpokorny@redhat.com>2014-09-03 19:23:01 +0200
commit2320b49d30011b44a791a341048f2afeab36705b (patch)
treeb4e0d667da664ba878fda5c8d4decd2da97f8a44 /tests
parent20be3b7463ada2d79d337c656c4f8c101504851a (diff)
downloadclufter-2320b49d30011b44a791a341048f2afeab36705b.tar.gz
clufter-2320b49d30011b44a791a341048f2afeab36705b.tar.xz
clufter-2320b49d30011b44a791a341048f2afeab36705b.zip
format: fix multiple class-level __init__ per one __new__ result
+ modify tests/run_cmd to trigger such a case Reported-by: Tomáš Jelínek" <tojelinek@redhat.com> Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/run_cmd.py26
1 files changed, 16 insertions, 10 deletions
diff --git a/tests/run_cmd.py b/tests/run_cmd.py
index f6ab60b..5a498a6 100644
--- a/tests/run_cmd.py
+++ b/tests/run_cmd.py
@@ -7,7 +7,7 @@ __author__ = "Jan Pokorný <jpokorny @at@ Red Hat .dot. com>"
import unittest
from os.path import dirname, exists, join
-from os import unlink
+#from os import unlink
import _bootstrap
@@ -20,7 +20,7 @@ class Main(unittest.TestCase):
# testcib = join(dirname(__file__), '.testcib.xml')
# testcoro = join(dirname(__file__), '.testcorosync.conf')
- # files = dict(
+ # outputs = dict(
# cib=testcib,
# coro=testcoro,
# )
@@ -28,9 +28,9 @@ class Main(unittest.TestCase):
# input=testfile,
# nocheck=True,
# batch=True,
- # **files)
+ # **outputs)
# )
- # for f in files.itervalues():
+ # for f in outputs.itervalues():
# try:
# unlink(f)
# except OSError:
@@ -38,25 +38,31 @@ class Main(unittest.TestCase):
# cmd_manager = CommandManager.implicit()
# self.assertFalse(cmd_manager.commands["ccs2pcs-needle"](clufter_args))
# # just the existence of the files is enough for now...
- # map(lambda f: self.assertTrue(exists(f)), files.itervalues())
+ # map(lambda f: self.assertTrue(exists(f)), outputs.itervalues())
def testCcs2PcsNeedleBetter(self):
testfile = join(dirname(__file__), 'filled.conf')
+ from clufter.formats.simpleconfig import simpleconfig
+ #from clufter.protocol import protocols
+ #protocols = protocols.plugins
- files = {
- "cib": {'passin': 'bytestring', },
- "coro": {'passin': 'bytestring', },
+ outputs = {
+ # alternatives for posterity:
+ #"cib" : {'passin': protocols['bytestring']},
+ #"cib" : {'passin': 'bytestring'},
+ "cib" : {'passin': simpleconfig.BYTESTRING},
+ "coro": {'passin': simpleconfig.STRUCT},
}
clufter_args = type("cluster_args", (object, ), dict(
input=testfile,
nocheck=True,
batch=True,
- **files)
+ **outputs)
)
cmd_manager = CommandManager.implicit()
self.assertFalse(cmd_manager.commands["ccs2pcs-needle"](clufter_args))
# just the existence of non-null strings is enough for now...
- map(lambda fspec: self.assertTrue(fspec['passout']), files.values())
+ map(lambda fspec: self.assertTrue(fspec['passout']), outputs.values())
if __name__ == '__main__':