Repository navigation
[tests] Remove unused color constants from the drules-mini fixture - #44
Merged
Merged
Conversation
The fixture's colors block mirrors the app styles, which no longer define these 19 constants: they were leftovers of removed features (local ads, hotel prices and ratings, guides, UGC) and were referenced by no MapCSS rule or client code. test_generate_drules_mini() asserts on type and drawing-rule counts only, so its expectations are unaffected. All 57 tests pass. Signed-off-by: Alexander Borsuk <me@alex.bio>
vng
approved these changes
Sep 4, 2026
biodranik
added a commit
to organicmaps/organicmaps
that referenced
this pull request
Sep 11, 2026
A forbidden [!key] in a mapcss-mapping.csv selector matches features without the key, but kothic evaluated styles against key=no, which MapCSS treats as set. Now such types can exclude tunnels without inheriting the tunnel styles. The generated drawing rules do not change. See organicmaps/kothic#46. The update also brings organicmaps/kothic#44, which only touches kothic's tests. Signed-off-by: Alexander Borsuk <me@alex.bio>
biodranik
added a commit
to organicmaps/organicmaps
that referenced
this pull request
Sep 12, 2026
A forbidden [!key] in a mapcss-mapping.csv selector matches features without the key, but kothic evaluated styles against key=no, which MapCSS treats as set. Now such types can exclude tunnels without inheriting the tunnel styles. The generated drawing rules do not change. See organicmaps/kothic#46. The update also brings organicmaps/kothic#44, which only touches kothic's tests. Signed-off-by: Alexander Borsuk <me@alex.bio>
biodranik
added a commit
to organicmaps/organicmaps
that referenced
this pull request
Sep 12, 2026
A forbidden [!key] in a mapcss-mapping.csv selector matches features without the key, but kothic evaluated styles against key=no, which MapCSS treats as set. Now such types can exclude tunnels without inheriting the tunnel styles. The generated drawing rules do not change. See organicmaps/kothic#46. The update also brings organicmaps/kothic#44, which only touches kothic's tests. Signed-off-by: Alexander Borsuk <me@alex.bio>
biodranik
added a commit
to organicmaps/organicmaps
that referenced
this pull request
Sep 14, 2026
A forbidden [!key] in a mapcss-mapping.csv selector matches features without the key, but kothic evaluated styles against key=no, which MapCSS treats as set. Now such types can exclude tunnels without inheriting the tunnel styles. The generated drawing rules do not change. See organicmaps/kothic#46. The update also brings organicmaps/kothic#44, which only touches kothic's tests. Signed-off-by: Alexander Borsuk <me@alex.bio>
biodranik
added a commit
to organicmaps/organicmaps
that referenced
this pull request
Sep 19, 2026
No code requests these named colors anymore: their users (local ads, Booking/guides/UGC marks, visited POI mask, hotel text outline, the old default track color, the transit secondary text outline) were removed earlier. The kothic test fixture already dropped them in organicmaps/kothic#44. Signed-off-by: Alexander Borsuk <me@alex.bio>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Drops 19 color constants (21 lines) from the
colorsblock oftests/assets/case-2-generate-drules-mini/main.mapcss.The fixture's colors block mirrors the Organic Maps app styles. Those styles no
longer define these constants — they were leftovers of removed features (local
ads, hotel prices and ratings, guides, UGC) and were referenced by no MapCSS
rule and no client code:
DefaultTrackColor,GuideCityMarkText,GuideOutdoorMarkText,HotelPriceText,LocalAds{Primary,Secondary}Text{,Outline},PoiHotelTextOutline,PoiVisitedMask,Rating{Bad,Good,None,Text},Searchmark{NotAvailable,Preparing,SelectedNotAvailable},TransitMarkSecondaryTextOutline,UGCRatingText.Companion to the removal in organicmaps/organicmaps.
Testing
python3 -m unittest discover -s tests -t .— 57 tests, all pass.test_generate_drules_mini()asserts ontypes.txtline/type counts and thenumber of types with drawing rules, none of which involve the colors block.