gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-bank] branch master updated: remove superfluous code


From: gnunet
Subject: [GNUnet-SVN] [taler-bank] branch master updated: remove superfluous code
Date: Thu, 13 Jul 2017 11:42:34 +0200

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository bank.

The following commit(s) were added to refs/heads/master by this push:
     new 8f55fe3  remove superfluous code
8f55fe3 is described below

commit 8f55fe3c49bfc1ed6e1774a1d82ea65160ba0c64
Author: Marcello Stanisci <address@hidden>
AuthorDate: Thu Jul 13 11:42:18 2017 +0200

    remove superfluous code
---
 Makefile.am               |  7 +++----
 run_tests.py              | 16 ----------------
 run_tests_alt_dbstring.py | 19 -------------------
 talerbank/talerconfig.py  |  2 +-
 4 files changed, 4 insertions(+), 40 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index dd1deea..bd561be 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,13 +23,12 @@ pkgdata_DATA = \
 install-dev:
        @$(PYTHON) ./install-dev.py
 
-# The wrapper is meant to catch hard errors (like no DB in place).  Can the 
wrapper-less way catch those errors as well?
 check:
-       @export DJANGO_SETTINGS_MODULE="talerbank.settings" 
TALER_PREFIX="@prefix@" TALER_CONFIG_FILE="bank-check.conf" && python3 
run_tests.py
+       @export DJANGO_SETTINGS_MODULE="talerbank.settings" 
TALER_PREFIX="@prefix@" TALER_CONFIG_FILE="bank-check.conf" && python3 -m 
django test talerbank.app.tests
        @printf -- 
"\n\n----------------------------------------------------------------------\nTesting
 against non existent config file\n\n"
-       @export DJANGO_SETTINGS_MODULE="talerbank.settings" 
TALER_PREFIX="@prefix@" TALER_CONFIG_FILE="non-existent.conf" && python3 
run_tests.py || true
+       @export DJANGO_SETTINGS_MODULE="talerbank.settings" 
TALER_PREFIX="@prefix@" TALER_CONFIG_FILE="non-existent.conf" && python3 -m 
django test talerbank.app.tests ; test 3 = $$?
        @printf -- 
"\n\n----------------------------------------------------------------------\nTesting
 against bad db string\n\n"
-       @export DJANGO_SETTINGS_MODULE="talerbank.settings" 
TALER_PREFIX="@prefix@" TALER_CONFIG_FILE="bank-check-alt-baddb.conf" && 
python3 run_tests_alt_dbstring.py ; test 2 = $$?
+       @export DJANGO_SETTINGS_MODULE="talerbank.settings" 
TALER_PREFIX="@prefix@" TALER_CONFIG_FILE="bank-check-alt-baddb.conf" && 
python3 -m django test talerbank.app.tests_alt.BadDatabaseStringTestCase ; test 
2 = $$?
 
 # install into prefix
 install-exec-hook:
diff --git a/run_tests.py b/run_tests.py
deleted file mode 100755
index 5b61934..0000000
--- a/run_tests.py
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env python3
-
-from django.core.management import call_command
-from django.db.utils import OperationalError
-import django
-import sys
-import logging
-
-django.setup()
-logger = logging.getLogger(__name__)
-
-try:
-    call_command("test", "talerbank.app.tests")
-except OperationalError:
-    logger.error("Catching DB hard error, skipping the test")
-    sys.exit(0)
diff --git a/run_tests_alt_dbstring.py b/run_tests_alt_dbstring.py
deleted file mode 100755
index 44babf6..0000000
--- a/run_tests_alt_dbstring.py
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env python3
-
-# This wrapper launches tests for badly written config
-# files.
-
-from django.core.management import call_command
-from django.db.utils import OperationalError
-import django
-import sys
-import logging
-
-django.setup()
-logger = logging.getLogger(__name__)
-
-try:
-    call_command("test", "talerbank.app.tests_alt")
-except OperationalError:
-    logger.error("Catching DB hard error, skipping the test")
-    sys.exit(0)
diff --git a/talerbank/talerconfig.py b/talerbank/talerconfig.py
index 3eab795..018ef2d 100644
--- a/talerbank/talerconfig.py
+++ b/talerbank/talerconfig.py
@@ -287,7 +287,7 @@ class TalerConfig:
                     sections[current_section][key] = e
         except FileNotFoundError:
             logger.error("Configuration file (%s) not found", filename)
-            sys.exit(1)
+            sys.exit(3)
 
 
     def dump(self):

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]