GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — burncode/tests/test_reading_fonts.py at main · burncode/burncode

Expand file tree

/

test_reading_fonts.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
26 lines (22 loc) · 1.13 KB
/

test_reading_fonts.py

Copy path

File metadata and controls

26 lines (22 loc) · 1.13 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import json
import unittest
from pathlib import Path
from xml.etree import ElementTree as ET
import build
ROOT = Path(__file__).resolve().parents[1]
NS = {'s': 'http://www.w3.org/2000/svg'}
class ReadingFontTests(unittest.TestCase):
def test_reading_and_terminal_fonts_are_separate(self):
cfg = build.validate(json.loads((ROOT / 'config.json').read_text(encoding='utf-8')), ROOT / 'config.json')
for theme in ('paper', 'violet'):
sections = build.render_sections(cfg, theme)
root = ET.fromstring(sections['hero'][0])
texts = {node.text: node.attrib['font-family'] for node in root.findall('.//s:text', NS)}
terminal = texts[cfg['profile']['username'] + '@github:~']
prose = texts[cfg['profile']['tagline_zh']]
self.assertIn('Microsoft YaHei', prose)
self.assertNotEqual(prose, terminal)
self.assertIn('Mono', terminal)
self.assertEqual(texts[cfg['projects'][0]['description']], prose)
self.assertEqual(texts['› ' + cfg['about']['lines'][0]], prose)
self.assertEqual(texts['› ' + cfg['now'][0]], prose)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.