Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.9.4 new test failures #1635

Closed
Apteryks opened this issue Apr 12, 2023 · 5 comments
Closed

3.9.4 new test failures #1635

Apteryks opened this issue Apr 12, 2023 · 5 comments
Assignees

Comments

@Apteryks
Copy link

Hi,

Testing an update to the GNU Guix python-afdko package to 3.9.4, I see these new test failures:

=================================== FAILURES ===================================
_________________________________ test_rvrn_vf _________________________________
[gw0] linux -- Python 3.9.9 /gnu/store/slsh0qjv5j68xda2bb6h8gsxwyi1j25a-python-wrapper-3.9.9/bin/python

    def test_rvrn_vf():
        input_dir = get_input_path('GSUBVar')
        temp_dir = get_temp_dir_path('GSUBVar')
        copytree(input_dir, temp_dir)
        ds_path = os.path.join(temp_dir, 'GSUBVar.designspace')
        runner(CMD + ['-o', 'd', f'_{ds_path}'])
        actual_path = os.path.join(temp_dir, 'GSUBVar.otf')
        actual_ttx = generate_ttx_dump(actual_path,
                                       ['CFF2', 'GSUB', 'avar', 'fvar'])
        expected_ttx = get_expected_path('GSUBVar.ttx')
>       assert differ([expected_ttx, actual_ttx, '-s', '<ttFont sfntVersion'])
E       AssertionError: assert False
E        +  where False = differ(['/tmp/guix-build-python-afdko-3.9.4.drv-0/afdko-3.9.4/tests/buildcff2vf_data/expected_output/GSUBVar.ttx', '/tmp/guix-build-python-afdko-3.9.4.drv-0/tmplc5datui', '-s', '<ttFont sfntVersion'])

tests/buildcff2vf_test.py:33: AssertionError
----------------------------- Captured stdout call -----------------------------
--- /tmp/guix-build-python-afdko-3.9.4.drv-0/afdko-3.9.4/tests/buildcff2vf_data/expected_output/GSUBVar.ttx
+++ /tmp/guix-build-python-afdko-3.9.4.drv-0/tmplc5datui
@@ -241,3 +241,3 @@
           <!-- LookupCount=1 -->
-          <LookupListIndex index="0" value="0"/>
+          <LookupListIndex index="0" value="1"/>
         </Feature>
@@ -283,3 +283,3 @@
               <!-- LookupCount=1 -->
-              <LookupListIndex index="0" value="1"/>
+              <LookupListIndex index="0" value="0"/>
             </Feature>
@@ -292,2 +292,3 @@
   <avar>
+    <version major="1" minor="0"/>
     <segment axis="wght">
----------------------------- Captured stderr call -----------------------------
Reading source fonts...
Building variable OTF (CFF2) font...
Importing STAT table override...
Overwriting existing STAT table with /tmp/guix-build-python-afdko-3.9.4.drv-0/tmpgm3zphii/GSUBVar/override.STAT.ttx.
Validating STAT axis values...
Built variable font '/tmp/guix-build-python-afdko-3.9.4.drv-0/tmpgm3zphii/GSUBVar/GSUBVar.otf'
_________________________________ test_cjk_vf __________________________________
[gw0] linux -- Python 3.9.9 /gnu/store/slsh0qjv5j68xda2bb6h8gsxwyi1j25a-python-wrapper-3.9.9/bin/python

    def test_cjk_vf():
        input_dir = get_input_path('CJKVar')
        temp_dir = get_temp_dir_path('CJKVar')
        copytree(input_dir, temp_dir)
        ds_path = os.path.join(temp_dir, 'CJKVar.designspace')
        runner(CMD + ['-o', 'd', f'_{ds_path}'])
        actual_path = os.path.join(temp_dir, 'CJKVar.otf')
        actual_ttx = generate_ttx_dump(actual_path,
                                       ['CFF2', 'HVAR', 'avar', 'fvar'])
        expected_ttx = get_expected_path('CJKVar.ttx')
>       assert differ([expected_ttx, actual_ttx, '-s', '<ttFont sfntVersion'])
E       AssertionError: assert False
E        +  where False = differ(['/tmp/guix-build-python-afdko-3.9.4.drv-0/afdko-3.9.4/tests/buildcff2vf_data/expected_output/CJKVar.ttx', '/tmp/guix-build-python-afdko-3.9.4.drv-0/tmpr6yc37s_', '-s', '<ttFont sfntVersion'])

tests/buildcff2vf_test.py:46: AssertionError
----------------------------- Captured stdout call -----------------------------
--- /tmp/guix-build-python-afdko-3.9.4.drv-0/afdko-3.9.4/tests/buildcff2vf_data/expected_output/CJKVar.ttx
+++ /tmp/guix-build-python-afdko-3.9.4.drv-0/tmpr6yc37s_
@@ -5414,2 +5414,3 @@
   <avar>
+    <version major="1" minor="0"/>
     <segment axis="wght">
----------------------------- Captured stderr call -----------------------------
Reading source fonts...
Building variable OTF (CFF2) font...
Importing STAT table override...
Overwriting existing STAT table with /tmp/guix-build-python-afdko-3.9.4.drv-0/tmpvv7lcctd/CJKVar/override.STAT.ttx.
Validating STAT axis values...
Built variable font '/tmp/guix-build-python-afdko-3.9.4.drv-0/tmpvv7lcctd/CJKVar/CJKVar.otf'
______________________________ test_sparse_cjk_vf ______________________________
[gw0] linux -- Python 3.9.9 /gnu/store/slsh0qjv5j68xda2bb6h8gsxwyi1j25a-python-wrapper-3.9.9/bin/python

    def test_sparse_cjk_vf():
        # subset fonts to lists in 'SHSansJPVFTest.subset.txt'
        # Check compatibility. Issue is in cid00089.
        # keep PostScript names
        input_dir = get_input_path('CJKSparseVar')
        temp_dir = get_temp_dir_path('CJKSparseVar')
        copytree(input_dir, temp_dir)
        ds_path = os.path.join(temp_dir, 'SHSansJPVFTest.designspace')
        subset_path = os.path.join(temp_dir, 'SHSansJPVFTest.subset.txt')
        runner(CMD + ['-o', 'd', f'_{ds_path}', 'i', f'_{subset_path}', 'c', 'k'])
        actual_path = os.path.join(temp_dir, 'SHSansJPVFTest.otf')
        actual_ttx = generate_ttx_dump(actual_path,
                                       ['CFF2', 'HVAR', 'avar', 'fvar'])
        expected_ttx = get_expected_path('SHSansJPVFTest.ttx')
>       assert differ([expected_ttx, actual_ttx, '-s', '<ttFont sfntVersion'])
E       AssertionError: assert False
E        +  where False = differ(['/tmp/guix-build-python-afdko-3.9.4.drv-0/afdko-3.9.4/tests/buildcff2vf_data/expected_output/SHSansJPVFTest.ttx', '/tmp/guix-build-python-afdko-3.9.4.drv-0/tmpaof_lh1i', '-s', '<ttFont sfntVersion'])

tests/buildcff2vf_test.py:63: AssertionError
----------------------------- Captured stdout call -----------------------------
--- /tmp/guix-build-python-afdko-3.9.4.drv-0/afdko-3.9.4/tests/buildcff2vf_data/expected_output/SHSansJPVFTest.ttx
+++ /tmp/guix-build-python-afdko-3.9.4.drv-0/tmpaof_lh1i
@@ -438,2 +438,3 @@
   <avar>
+    <version major="1" minor="0"/>
     <segment axis="wght">
----------------------------- Captured stderr call -----------------------------
Reading source fonts...
Subsetting source fonts...
Saving subset font /tmp/guix-build-python-afdko-3.9.4.drv-0/tmpavwg_ms2/CJKSparseVar/sources/MasterSet_Kanji-w0.00.subset.otf
Saving subset font /tmp/guix-build-python-afdko-3.9.4.drv-0/tmpavwg_ms2/CJKSparseVar/sources/MasterSet_Kanji-w799.00.subset.otf
Saving subset font /tmp/guix-build-python-afdko-3.9.4.drv-0/tmpavwg_ms2/CJKSparseVar/sources/MasterSet_Kanji-w800.00.subset.otf
Saving subset font /tmp/guix-build-python-afdko-3.9.4.drv-0/tmpavwg_ms2/CJKSparseVar/sources/MasterSet_Kanji-w1000.00.subset.otf
Checking outline compatibility in source fonts...
Converted between line and curve in source font index '1' glyph 'cid00089', point index '4' at '[-36, 87]'. Please check correction.
Building variable OTF (CFF2) font...
Importing STAT table override...
Overwriting existing STAT table with /tmp/guix-build-python-afdko-3.9.4.drv-0/tmpavwg_ms2/CJKSparseVar/override.STAT.ttx.
Validating STAT axis values...
Built variable font '/tmp/guix-build-python-afdko-3.9.4.drv-0/tmpavwg_ms2/CJKSparseVar/SHSansJPVFTest.otf'
=============================== warnings summary ===============================
../../../gnu/store/8kmzsmpd339jvba49yyf9pzjghyricb6-python-fs-2.4.16/lib/python3.9/site-packages/fs/__init__.py:4: 24 warnings
  /gnu/store/8kmzsmpd339jvba49yyf9pzjghyricb6-python-fs-2.4.16/lib/python3.9/site-packages/fs/__init__.py:4: UserWarning: Module afdko was already imported from /gnu/store/bb1mjcnsqqc3pkhj60is6q0ia7am7nw4-python-afdko-3.9.4/lib/python3.9/site-packages/afdko/__init__.py, but /tmp/guix-build-python-afdko-3.9.4.drv-0/afdko-3.9.4 is being added to sys.path
    __import__("pkg_resources").declare_namespace(__name__)  # type: ignore

-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================== short test summary info ============================
FAILED tests/buildcff2vf_test.py::test_rvrn_vf - AssertionError: assert False
FAILED tests/buildcff2vf_test.py::test_cjk_vf - AssertionError: assert False
FAILED tests/buildcff2vf_test.py::test_sparse_cjk_vf - AssertionError: assert...
= 3 failed, 1378 passed, 4 skipped, 8 xfailed, 24 warnings in 73.69s (0:01:13) =
error: in phase 'check': uncaught exception:
%exception #<&invoke-error program: "pytest" arguments: ("-vv" "--dist" "loadfile" "-n" "24" "-k not test_type1mm_inputs") exit-status: 1 term-signal: #f stop-signal: #f> 
phase `check' failed after 74.2 seconds

The inputs used were:

antlr4@4.10.1 java-antlr4-runtime-cpp@4.10.1 libxml2@2.9.12 ninja@1.10.2 openjdk@19.0.1
+ pkg-config@0.29.2 psautohint@2.4.0 python-booleanoperations@0.9.0 python-defcon@0.10.2
+ python-fontmath@0.9.3 python-fonttools@4.39.3 python-lxml@4.6.3 python-pytest-xdist@2.1.0
+ python-pytest@6.2.5 python-scikit-build@0.14.0 python-setuptools-scm@6.3.2 python-tqdm@4.64.1
+ python-ufonormalizer@0.6.1 python-ufoprocessor@1.9.0 python-wheel@0.37.0 util-linux@2.37.2

Thank you!

@kaydeearts
Copy link
Collaborator

Thank you for reporting! Looks like these errors are caused by fontTools v4.39.3 changes — PR #1639 updates fontTools to the latest version in requirements.txt as well as corrects these expected outputs.

I'll comment on this issue again once we merge that PR!

@kaydeearts kaydeearts self-assigned this Apr 13, 2023
@kaydeearts
Copy link
Collaborator

kaydeearts commented Apr 13, 2023

Just merged that PR into develop — will make a release soon containing the updates and will let you know!

@Apteryks
Copy link
Author

Sounds good, thanks! :-)

@kaydeearts
Copy link
Collaborator

@Apteryks we've made a new release v3.9.5. Does this version fix the failures you're seeing?

@Apteryks
Copy link
Author

Apteryks commented May 7, 2023

Hello! It does! Thank you :-).

@Apteryks Apteryks closed this as completed May 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants