treee111 / wahooMapsCreator

Create maps for Wahoo device based on latest OSM maps
247 stars 25 forks source link

[DEV] Fix unittests #222

Closed treee111 closed 10 months ago

treee111 commented 10 months ago

This PR…

fixes the unittests. Unittests have not been checked locally for some time and thus are not working due to latest changes. These are the three things they are failing on 02.11.2023:

  1. more OSM elements are included in the tags-to-keep.json but are not in the hardcoded list to check against in the unittests - fixed by bf8f0d663f82f6f5d4fb996a0a40a1424efcb5c5
  2. corrects including elevation data into the maps. If elevation data was present per tile (from a run earlier), they are included into the generated maps even if not requested - i.e. -con is not given. That makes the generated files from unittests differ from the static files in the repo because they are not generated with elevation data. Fixed by 1a24bdba1b7844e88ef3a227c1c480e2bddaf7ff, already fixed by #223
  3. adds new static files to check against for macOS and Windows to have the newly added OSM elements in the static files to check against - fixed by d39a6d4faa81ae9192b6ecb30f1fa4bb4fc8a64d

Considerations and implementations

This is the main body of the PR, and varies massively by PR. A simple PR may have a single sentence here, others may have multiple paragraphs, diagrams, etc.

{...}

How to test

  1. setup unittests
  2. run unittests under macOS and Windows

Pull Request Checklist

alfh commented 10 months ago

I can confirm that the unit tests in this branch runs OK on my linux machine as well, using the zip file for the land polygon that you provided in pr #220

Here is the output Ran 58 tests in 47.216s

So I guess pr 220 can be cancelled, and this one merged then.

treee111 commented 10 months ago

I can confirm that the unit tests in this branch runs OK on my linux machine as well, using the zip file for the land polygon that you provided in pr #220

Here is the output Ran 58 tests in 47.216s

So I guess pr 220 can be cancelled, and this one merged then.

thanks for confirming 👍

I added the documentation for unittests with ee48c82