<p></p>
<p><b>@lonvia</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/osm2pgsql/pull/1288#discussion_r503794843">tests/regression.py</a>:</p>
<pre style='color:#555'>> @@ -121,6 +124,10 @@ def setUpClass(cls):
@classmethod
def tearDownClass(cls):
+ with psycopg2.connect("dbname='{}'".format(CONFIG['test_database'])) as conn:
+ with conn.cursor() as cur:
+ if cls.schema:
</pre>
<p>You'd want to pull out this 'if' to avoid creating a connection when there is no schema.</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/osm2pgsql/pull/1288#discussion_r503798552">tests/regression.py</a>:</p>
<pre style='color:#555'>> extra_params = ['--slim', '-d', 'postgres:///' + CONFIG['test_database']]
+# Schema tests
+
+class TestDBOutputSchema(BaseUpdateRunnerWithOutputSchema, unittest.TestCase,
+ PgsqlBaseTests):
+ extra_params = ['--slim', '--output-pgsql-schema=osm']
</pre>
<p>I would expect that the <code>PgsqlBaseTests</code> do not work here because the tests use table names without a schema. Am I missing something?</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/osm2pgsql/pull/1288#pullrequestreview-507230743">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353V2PZQZDHUHXNQZVRLSKQLYBANCNFSM4SLU3KZA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AA6353RBSUBGBKVR6XVUTR3SKQLYBA5CNFSM4SLU3KZKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGODY53UFY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/osm2pgsql/pull/1288#pullrequestreview-507230743",
"url": "https://github.com/openstreetmap/osm2pgsql/pull/1288#pullrequestreview-507230743",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>