Обсуждение: [pgadmin-hackers][patch] We can see tables in Greenplum!
Hello Hackers!
This isn't super important, but does anyone know why our test comment doesn't show up in test output?
We've a fix for displaying table nodes when connected to Greenplum. The salient bit was leaving off tgisinternal from the default template (but leaving the template used for postgres 9.1+ unchanged).
We also added a Database helper class in test_utils for setting up and tearing down a database. It can be used via python's with (see TestTablesNode).
This isn't super important, but does anyone know why our test comment doesn't show up in test output?
We see:
runTest (pgadmin.browser.server_groups.servers.databases.schemas.tables.templates.table.sql.tests.test_tables_node.TestTablesNode) ... {'oid': 106072, 'has_enable_triggers': '0', 'name': 'test_table', 'triggercount': '0'}
Whereas for other tests we see output like
This function update the server details (Default Server Node url)
Cheers!
Tira & George
Tira & George
Вложения
Hello,
Regarding test output,
Comment Style-1: If we comment like
"""Test Case is used for... """
Result:
runTest (pgadmin.xxx)Test case to verify server group (Get server list) ... ok
Comment Style-2: If we comment like
"""
Test Case is used for ...."""
Result:
runTest runTest (pgadmin.xxx)... ok Unittest framework strip the doc string with "\n" and get the string at 0th index so in case of Comment Style-2 it will be empty, so no description will be displayed.
So use Comment Style-1 when you write test cases.
--
Regards,
On Wed, Feb 8, 2017 at 9:26 PM, George Gelashvili <ggelashvili@pivotal.io> wrote:
Hello Hackers!We've a fix for displaying table nodes when connected to Greenplum. The salient bit was leaving off tgisinternal from the default template (but leaving the template used for postgres 9.1+ unchanged).We also added a Database helper class in test_utils for setting up and tearing down a database. It can be used via python's with (see TestTablesNode).
This isn't super important, but does anyone know why our test comment doesn't show up in test output?We see:runTest (pgadmin.browser.server_groups.servers.databases. schemas.tables.templates. table.sql.tests.test_tables_ node.TestTablesNode) ... {'oid': 106072, 'has_enable_triggers': '0', 'name': 'test_table', 'triggercount': '0'} Whereas for other tests we see output likeThis function update the server details (Default Server Node url)Cheers!
Tira & George
--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Great! Here is an updated patch set.
-Tira & George
On Thu, Feb 9, 2017 at 12:33 AM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hello,Regarding test output,Comment Style-1: If we comment like"""Test Case is used for... """Result:runTest (pgadmin.xxx)Test case to verify server group (Get server list) ... okComment Style-2: If we comment like"""Test Case is used for ...."""Result:runTest runTest (pgadmin.xxx)... ok Unittest framework strip the doc string with "\n" and get the string at 0th index so in case of Comment Style-2 it will be empty, so no description will be displayed.So use Comment Style-1 when you write test cases.--Regards,On Wed, Feb 8, 2017 at 9:26 PM, George Gelashvili <ggelashvili@pivotal.io> wrote:--Hello Hackers!We've a fix for displaying table nodes when connected to Greenplum. The salient bit was leaving off tgisinternal from the default template (but leaving the template used for postgres 9.1+ unchanged).We also added a Database helper class in test_utils for setting up and tearing down a database. It can be used via python's with (see TestTablesNode).
This isn't super important, but does anyone know why our test comment doesn't show up in test output?We see:runTest (pgadmin.browser.server_groups.servers.databases.schemas. tables.templates.table.sql. tests.test_tables_node. TestTablesNode) ... {'oid': 106072, 'has_enable_triggers': '0', 'name': 'test_table', 'triggercount': '0'} Whereas for other tests we see output likeThis function update the server details (Default Server Node url)Cheers!
Tira & George
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Вложения
Thanks, applied! On Thu, Feb 9, 2017 at 3:57 PM, Atira Odhner <aodhner@pivotal.io> wrote: > Great! Here is an updated patch set. > > -Tira & George > > On Thu, Feb 9, 2017 at 12:33 AM, Murtuza Zabuawala > <murtuza.zabuawala@enterprisedb.com> wrote: >> >> Hello, >> >> Regarding test output, >> >> >> Comment Style-1: If we comment like >> >> """Test Case is used for... """ >> >> Result: >> >> runTest (pgadmin.xxx) >> Test case to verify server group (Get server list) ... ok >> >> >> Comment Style-2: If we comment like >> >> """ >> >> Test Case is used for .... >> """ >> >> Result: >> >> runTest runTest (pgadmin.xxx) ... ok >> >> Unittest framework strip the doc string with "\n" and get the string at >> 0th index so in case of Comment Style-2 it will be empty, so no description >> will be displayed. >> >> So use Comment Style-1 when you write test cases. >> >> >> >> -- >> Regards, >> Murtuza Zabuawala >> EnterpriseDB: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company >> >> On Wed, Feb 8, 2017 at 9:26 PM, George Gelashvili <ggelashvili@pivotal.io> >> wrote: >>> >>> Hello Hackers! >>> >>> We've a fix for displaying table nodes when connected to Greenplum. The >>> salient bit was leaving off tgisinternal from the default template (but >>> leaving the template used for postgres 9.1+ unchanged). >>> We also added a Database helper class in test_utils for setting up and >>> tearing down a database. It can be used via python's with (see >>> TestTablesNode). >>> >>> >>> This isn't super important, but does anyone know why our test comment >>> doesn't show up in test output? >>> >>> We see: >>>> >>>> runTest >>>> (pgadmin.browser.server_groups.servers.databases.schemas.tables.templates.table.sql.tests.test_tables_node.TestTablesNode) >>>> ... {'oid': 106072, 'has_enable_triggers': '0', 'name': 'test_table', >>>> 'triggercount': '0'} >>> >>> >>> Whereas for other tests we see output like >>>> >>>> This function update the server details (Default Server Node url) >>> >>> >>> Cheers! >>> Tira & George >>> >>> >>> >>> -- >>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) >>> To make changes to your subscription: >>> http://www.postgresql.org/mailpref/pgadmin-hackers >>> >> > > > > -- > Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgadmin-hackers > -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company