<p>This is a complete rewrite of the regression tests making more use of the boilerplating provided by Python unittest. In addition cmake now installs a Python script in the build directory that allows to execute the tests from any directory.</p>
<p>There is a couple of goals here:</p>
<ul>
<li>Make sure all checks are always executed, even when some of them fail. This was always a major source of pain when updating the values after osm2pgsql's behaviour has changed.</li>
<li>Make it more obvious how the checks go together. You can now see how the different parameters change the outcome of the different SQL queries. (In fact, some of those are worth looking at.)</li>
<li>Make it easier to add/remove tests for a group of different osm2pgsql runs.</li>
</ul>
<p>I've left almost all of the tests as they were before. However, looking at the multipolygon tests, many of them have been created for old-style MPs and are not that useful anymore.</p>
<p><span class="issue-keyword tooltipped tooltipped-se" aria-label="This pull request closes issue #490.">Fixes</span> <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="114462675" data-permission-text="Issue title is private" data-url="https://github.com/openstreetmap/osm2pgsql/issues/490" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/osm2pgsql/issues/490/hovercard" href="https://github.com/openstreetmap/osm2pgsql/issues/490">#490</a>.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/openstreetmap/osm2pgsql/pull/1003'>https://github.com/openstreetmap/osm2pgsql/pull/1003</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Reorganzise regression tests</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/osm2pgsql/pull/1003/files#diff-0">tests/CMakeLists.txt</a>
    (6)
  </li>
  <li>
    <strong>D</strong>
    <a href="https://github.com/openstreetmap/osm2pgsql/pull/1003/files#diff-1">tests/regression-test.py</a>
    (628)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/osm2pgsql/pull/1003/files#diff-2">tests/regression-test.py.tmpl</a>
    (15)
  </li>
  <li>
    <strong>D</strong>
    <a href="https://github.com/openstreetmap/osm2pgsql/pull/1003/files#diff-3">tests/regression-test.sh</a>
    (4)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/osm2pgsql/pull/1003/files#diff-4">tests/regression.py</a>
    (737)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/osm2pgsql/pull/1003.patch'>https://github.com/openstreetmap/osm2pgsql/pull/1003.patch</a></li>
  <li><a href='https://github.com/openstreetmap/osm2pgsql/pull/1003.diff'>https://github.com/openstreetmap/osm2pgsql/pull/1003.diff</a></li>
</ul>

<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/1003?email_source=notifications&email_token=AA6353XI54KP4AH2B5U24ETQVQSWTA5CNFSM4JRNZKW2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H35E7HQ">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353XNCSYYQJED6N5TEF3QVQSWTANCNFSM4JRNZKWQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AA6353QIN2XI5O5GUZGFDD3QVQSWTA5CNFSM4JRNZKW2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H35E7HQ.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/1003?email_source=notifications\u0026email_token=AA6353XI54KP4AH2B5U24ETQVQSWTA5CNFSM4JRNZKW2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H35E7HQ",
"url": "https://github.com/openstreetmap/osm2pgsql/pull/1003?email_source=notifications\u0026email_token=AA6353XI54KP4AH2B5U24ETQVQSWTA5CNFSM4JRNZKW2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H35E7HQ",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>