mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-20 18:59:07 -05:00
fix: claim a source pin only where one exists
This commit is contained in:
1 parent
4d360c3cc1
commit
dfc4d24ae8
2 files changed
+24
-1
No files matched your search
@@ -565,5 +565,24 @@ class EmulatorPartsCarryTheirIdentity(unittest.TestCase):
|
||||
)
|
||||
|
||||
|
||||
class OnlyAPinnedProfileClaimsAPin(unittest.TestCase):
|
||||
"""Redream, with no revision at all, was described as source-pinned."""
|
||||
|
||||
def test_the_description_follows_the_pin(self):
|
||||
from unittest import mock # noqa: PLC0415
|
||||
|
||||
import generate_site # noqa: PLC0415
|
||||
|
||||
pages = {
|
||||
"emulators/pinned.md": {"about": {"version": "a" * 40}},
|
||||
"emulators/redream.md": {},
|
||||
}
|
||||
with mock.patch.dict(generate_site.PAGE_DATA, pages, clear=True):
|
||||
pinned = generate_site._page_description("", Path("emulators/pinned.md"), "P")
|
||||
loose = generate_site._page_description("", Path("emulators/redream.md"), "R")
|
||||
self.assertIn("source-pinned", pinned)
|
||||
self.assertNotIn("source-pinned", loose)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user