mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-20 16:47:49 -06:00
fix: install site sections before the page plan
plan_emulator_pages names systems, and siterender then fell back to the repository's database.json and emulators/ whatever --db and --emulators-dir gave.
This commit is contained in:
1 parent
c624a820f0
commit
cf7b2ad9c1
2 files changed
+22
-2
No files matched your search
@@ -118,3 +118,22 @@ class SystemNames(unittest.TestCase):
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
|
||||
class SectionsComeBeforeThePlan(unittest.TestCase):
|
||||
"""plan_emulator_pages names systems. Run before set_console_sections,
|
||||
it made siterender read ./database.json and ./emulators whatever --db
|
||||
and --emulators-dir gave, so the parts were cut on another collection."""
|
||||
|
||||
def test_generate_installs_the_sections_before_planning(self):
|
||||
import ast
|
||||
import inspect
|
||||
|
||||
import generate_site
|
||||
|
||||
tree = ast.parse(inspect.getsource(generate_site._generate))
|
||||
lines = {}
|
||||
for node in ast.walk(tree):
|
||||
if isinstance(node, ast.Call) and isinstance(node.func, ast.Name):
|
||||
lines.setdefault(node.func.id, node.lineno)
|
||||
self.assertLess(lines["set_console_sections"], lines["plan_emulator_pages"])
|
||||
Reference in new issue
Block a user