public inbox for [email protected]  
help / color / mirror / Atom feed
From: Murtuza Zabuawala <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin4][Patch] Minor fix in test file for the Template loader
Date: Tue, 31 Jan 2017 10:55:47 +0530
Message-ID: <CAKKotZSe8LGDeYMPSYkPaEp05-Co4pL8_Vj1VedWwSg8QC+69w@mail.gmail.com> (raw)
List-Unsubscribe:  <mailto:[email protected]?body=unsub%20pgadmin-hackers>

Hi,

PFA patch to fix the issue in test suite for template loader.

*Issue(Python3):*
murtuza@vm:~/pgadmin4/web/regression$ python3 runtests.py
pgAdmin 4 - Application Initialisation
======================================


The configuration database - '/../.pgadmin/test_pgadmin4.db' does not exist.
Entering initial setup mode...
NOTE: Configuring authentication for SERVER mode.


The configuration database has been created at /../.pgadmin/test_pgadmin4.db
Traceback (most recent call last):
  File "runtests.py", line 250, in <module>
    test_module_list = get_test_modules(args)
  File "runtests.py", line 138, in get_test_modules
    TestsGeneratorRegistry.load_generators('pgadmin')
  File "../../pgadmin4/web/pgadmin/utils/route.py", line 66, in
load_generators
    import_module(module_name)
  File "/../../3.5/lib/python3.5/importlib/__init__.py", line 126, in
import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 658, in exec_module
  File "<frozen importlib._bootstrap_external>", line 764, in get_code
  File "<frozen importlib._bootstrap_external>", line 724, in source_to_code
  File "<frozen importlib._bootstrap>", line 222, in
_call_with_frames_removed
  File
"/../../pgadmin4/web/pgadmin/utils/tests/test_versioned_template_loader.py",
line 50
    except TemplateNotFound, e:
                           ^
SyntaxError: invalid syntax

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [application/octet-stream] Fix_template_loader_test.patch (694B, 3-Fix_template_loader_test.patch)
  download | inline diff:
diff --git a/web/pgadmin/utils/tests/test_versioned_template_loader.py b/web/pgadmin/utils/tests/test_versioned_template_loader.py
index 3117c33..b2f5c4c 100644
--- a/web/pgadmin/utils/tests/test_versioned_template_loader.py
+++ b/web/pgadmin/utils/tests/test_versioned_template_loader.py
@@ -47,9 +47,10 @@ class TestVersionedTemplateLoader(BaseTestGenerator):
         try:
             self.loader.get_source(None, "some_feature/sql/#10100#/some_action.sql")
             self.fail("No exception raised")
-        except TemplateNotFound, e:
+        except TemplateNotFound:
             return
 
+
 class FakeApp(Flask):
     def __init__(self):
         super(FakeApp, self).__init__("")


view thread (7+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: [pgAdmin4][Patch] Minor fix in test file for the Template loader
  In-Reply-To: <CAKKotZSe8LGDeYMPSYkPaEp05-Co4pL8_Vj1VedWwSg8QC+69w@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox