From 3cd8a8f38f9a3899b4f7ad993742354a9e2c7f5e Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Fri, 13 Mar 2015 02:05:02 -0400 Subject: [PATCH] Travis: use pip3; make gramps home; allow cli test to work if dir exists --- .travis.yml | 9 +++++---- gramps/cli/test/cli_test.py | 5 ++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index abf6878fa..8b9787ab2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,11 +9,12 @@ python: install: - time sudo apt-get update - - travis_retry sudo apt-get install python3-gobject python3-gi python3-cairo python3-gi-cairo gir1.2-pango gir1.2-gtk python3-bsddb3 xdg-utils librsvg2-common python3-dev libglib2.0-dev intltool python3-nose - - travis_retry pip install django - - travis_retry pip install pyicu + - travis_retry sudo apt-get install python3-gobject python3-gi python3-cairo python3-gi-cairo gir1.2-pango gir1.2-gtk python3-bsddb3 xdg-utils librsvg2-common python3-dev libglib2.0-dev intltool python3-nose python3-pip + - travis_retry pip3 install django + - travis_retry pip3 install pyicu - python setup.py build script: - - DJANGO_SETTINGS_MODULE=gramps.webapp.settings nosetests3 -v --exclude=TestcaseGenerator --exclude=exportvcard_test --exclude=plugins --exclude=vcard --exclude=merge_ref_test --exclude=test_util_test --exclude=gramps.webapp --exclude=test2_exec_CLI --exclude=widgets --exclude=gui --exclude=test3_files_in_import_dir --exclude=test_manual_run gramps + - mkdir -p /home/travis/.gramps/grampsdb/ + - DJANGO_SETTINGS_MODULE=gramps.webapp.settings nosetests3 --exclude=TestcaseGenerator --exclude=exportvcard_test --exclude=plugins --exclude=vcard --exclude=merge_ref_test --exclude=test_util_test --exclude=gramps.webapp --exclude=test2_exec_CLI --exclude=widgets --exclude=gui --exclude=test3_files_in_import_dir --exclude=test_manual_run gramps diff --git a/gramps/cli/test/cli_test.py b/gramps/cli/test/cli_test.py index 87f01322e..e36a747d2 100644 --- a/gramps/cli/test/cli_test.py +++ b/gramps/cli/test/cli_test.py @@ -105,7 +105,10 @@ class Test(unittest.TestCase): # (eg cleanout stale files from prior crash-runs) def test3_files_in_import_dir(self): ddir = os.path.join(TEMP_DIR, "import_dbdir") - os.makedirs(ddir) + try: + os.makedirs(ddir) + except: + pass bogofiles = [os.path.join(ddir, fn) for fn in ("family.db", "lock")] for fn in bogofiles: with io.open(fn, "w") as f: