googlefonts / googlefonts/glyphsLib
Assertion failures on Arch when building -current
- Dominant language
- Python
- Stars
- 201
- Forks
- 56
- Avg merge
- 17m
- Merged PRs (30d)
- 1
Description
I'm getting the following assertion errors when building on Arch (x64) with -current:
```
=================================== FAILURES ===================================
___________________________ test_guidelines[defcon] ____________________________
ufo_module =
def test_guidelines(ufo_module):
ufo = ufo_module.Font()
a = ufo.newGlyph("a")
for obj in [ufo, a]:
# Complete guideline
obj.appendGuideline(
dict(x=10, y=20, angle=30, name="lc", color="1,0,0,1", identifier="lc1")
)
# Don't crash if a guideline misses information
obj.appendGuideline({"x": 10})
obj.appendGuideline({"y": 20})
font = to_glyphs([ufo])
for gobj in [font.masters[0], font.glyphs["a"].layers[0]]:
assert len(gobj.guides) == 3
angled, vertical, horizontal = gobj.guides
assert angled.position.x == 10
assert angled.position.y == 20
assert angled.angle == 30
assert angled.name == "lc [1,0,0,1] [#lc1]"
assert vertical.position.x == 10
assert vertical.angle == 90
assert horizontal.position.y == 20
assert horizontal.angle == 0
(ufo,) = to_ufos(font, minimal=False)
for obj in [ufo, ufo["a"]]:
angled, vertical, horizontal = obj.guidelines
assert angled.x == 10
assert angled.y == 20
assert angled.angle == 30
assert angled.name == "lc"
assert angled.color == "1,0,0,1"
assert angled.identifier == "lc1"
assert vertical.x == 10
> assert vertical.y is None
E assert 0 is None
E + where 0 = Guideline(x=10, y=0, angle=0, name=None, color=None, identifier=None).y
tests/builder/to_glyphs_test.py:227: AssertionError
___________________________ test_guidelines[ufoLib2] ___________________________
ufo_module =
def test_guidelines(ufo_module):
ufo = ufo_module.Font()
a = ufo.newGlyph("a")
for obj in [ufo, a]:
# Complete guideline
obj.appendGuideline(
dict(x=10, y=20, angle=30, name="lc", color="1,0,0,1", identifier="lc1")
)
# Don't crash if a guideline misses information
obj.appendGuideline({"x": 10})
obj.appendGuideline({"y": 20})
font = to_glyphs([ufo])
for gobj in [font.masters[0], font.glyphs["a"].layers[0]]:
assert len(gobj.guides) == 3
angled, vertical, horizontal = gobj.guides
assert angled.position.x == 10
assert angled.position.y == 20
assert angled.angle == 30
assert angled.name == "lc [1,0,0,1] [#lc1]"
assert vertical.position.x == 10
> assert vertical.angle == 90
E assert 0 == 90
E + where 0 = .angle
tests/builder/to_glyphs_test.py:209: AssertionError
```
I'm getting the same when trying to build from the latest release archive. Python is 3.11.3.
Contributor guide
Research direction
Start with tests/builder/to_glyphs_test.py and run test_guidelines for both defcon and ufoLib2 on Arch with Python 3.11.3. Compare the failing vertical and horizontal guideline values with the expected assertions, and confirm the tests pass for both dependencies and the latest release archive.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100