From 35dead7b26343e5a201457d12cb834449f0c91b6 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Wed, 18 Mar 2015 03:57:27 -0400 Subject: [PATCH] Enable all tests, except those to be rewritten/excluded --- .travis.yml | 2 +- gramps/cli/test/cli_test.py | 4 ++-- gramps/plugins/importer/test/importvcard_test.py | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 12c89fa80..5a6ab02f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,4 +26,4 @@ install: script: - mkdir -p /home/travis/.gramps/grampsdb/ - - DJANGO_SETTINGS_MODULE=gramps.webapp.settings nosetests3 --exclude=TestcaseGenerator --exclude=exportvcard_test --exclude=vcard --exclude=merge_ref_test --exclude=test2_exec_CLI --exclude=test3_files_in_import_dir --exclude=test_manual_run gramps + - DJANGO_SETTINGS_MODULE=gramps.webapp.settings nosetests3 --exclude=TestcaseGenerator --exclude=vcard --exclude=merge_ref_test gramps diff --git a/gramps/cli/test/cli_test.py b/gramps/cli/test/cli_test.py index c62b7de92..4ceb47be9 100644 --- a/gramps/cli/test/cli_test.py +++ b/gramps/cli/test/cli_test.py @@ -75,7 +75,7 @@ class Test(unittest.TestCase): ifile = min1r ofile = out_ged gcmd = "Gramps.py -i %s -e %s" % (ifile, ofile) - process = subprocess.Popen("python %s" % gcmd, + process = subprocess.Popen("python3 %s" % gcmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) @@ -107,7 +107,7 @@ class Test(unittest.TestCase): ifile = min1r ofile = out_ged gcmd = "Gramps.py -i %s -e %s" % (ifile, ofile) - process = subprocess.Popen("python %s" % gcmd, + process = subprocess.Popen("python3 %s" % gcmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) diff --git a/gramps/plugins/importer/test/importvcard_test.py b/gramps/plugins/importer/test/importvcard_test.py index d1f4fc226..e43a93d06 100644 --- a/gramps/plugins/importer/test/importvcard_test.py +++ b/gramps/plugins/importer/test/importvcard_test.py @@ -29,9 +29,9 @@ import time import subprocess import xml.etree.ElementTree as ET -from ...lib.libgrampsxml import GRAMPS_XML_VERSION +from gramps.plugins.lib.libgrampsxml import GRAMPS_XML_VERSION from gramps.version import VERSION -from ..importvcard import VCardParser, fitin, splitof_nameprefix +from gramps.plugins.importer.importvcard import VCardParser, fitin, splitof_nameprefix class VCardCheck(unittest.TestCase): def setUp(self): @@ -72,18 +72,18 @@ class VCardCheck(unittest.TestCase): return ET.tostring(doc, encoding='utf-8') - def do_case(self, input_str, expect_doc, debug=False): + def do_case(self, input_str, expect_doc, debug=True): if debug: print(input_str) - process = subprocess.Popen('python Gramps.py -d .Date -d .ImportVCard ' + process = subprocess.Popen('python3 Gramps.py -d .Date -d .ImportVCard ' '--config=preferences.eprefix:DEFAULT ' '-i - -f vcf -e - -f gramps', stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) - result_str, err_str = process.communicate(input_str.encode('utf-8')) + result_str, err_str = process.communicate(input_str.encode("utf-8")) if debug: print(err_str) result_doc = ET.XML(result_str)