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

Missing test data in pypi source distfile #3660

Open
0-wiz-0 opened this issue Oct 12, 2024 · 0 comments
Open

Missing test data in pypi source distfile #3660

0-wiz-0 opened this issue Oct 12, 2024 · 0 comments

Comments

@0-wiz-0
Copy link

0-wiz-0 commented Oct 12, 2024

I'm packaging fonttools for pkgsrc. We use the pypi source distribution files.
When I run the self tests, they complain about a couple missing files and a permission error:

FAILED Tests/tfmLib/tfmLib_test.py::test_read_boundary_char - FileNotFoundError: [Errno 2] No such file or directory: '/scratch/fonts/py-fonttools/work/fonttools-4.54.1/Tests/tfmLib/data/dummy-space.tfm'
FAILED Tests/tfmLib/tfmLib_test.py::test_read_fontdimens_vanilla - FileNotFoundError: [Errno 2] No such file or directory: '/scratch/fonts/py-fonttools/work/fonttools-4.54.1/Tests/tfmLib/data/cmr10.tfm'
FAILED Tests/tfmLib/tfmLib_test.py::test_read_fontdimens_mathex - FileNotFoundError: [Errno 2] No such file or directory: '/scratch/fonts/py-fonttools/work/fonttools-4.54.1/Tests/tfmLib/data/cmex10.tfm'
FAILED Tests/tfmLib/tfmLib_test.py::test_read_fontdimens_mathsy - FileNotFoundError: [Errno 2] No such file or directory: '/scratch/fonts/py-fonttools/work/fonttools-4.54.1/Tests/tfmLib/data/cmsy10.tfm'
FAILED Tests/ufoLib/UFO3_test.py::UFO3WriteLayersTestCase::testRemoveDefaultLayer - fs.errors.PermissionDenied: permission denied
FAILED Tests/ufoLib/UFO3_test.py::UFO3WriteLayersTestCase::testRemoveLayer - fs.errors.PermissionDenied: permission denied
FAILED Tests/voltLib/volttofea_test.py::ToFeaTest::test_cli_vtp - FileNotFoundError: [Errno 2] No such file or directory: '/scratch/fonts/py-fonttools/work/fonttools-4.54.1/Tests/voltLib/data/Nutso.vtp'
FAILED Tests/voltLib/volttofea_test.py::ToFeaTest::test_group_order - FileNotFoundError: [Errno 2] No such file or directory: '/scratch/fonts/py-fonttools/work/fonttools-4.54.1/Tests/voltLib/data/NamdhinggoSIL1006.vtp'
FAILED tfmLib.py::fontTools.tfmLib

Can you please include the test data in the pypi source distribution files?

As for the other two, I have no clue yet:

_____________________________________________________________ UFO3WriteLayersTestCase.testRemoveLayer ______________________________________________________________
self = OSFS('/tmp/tmpp8tsivm8/test.ufo'), path = 'glyphs.layer 1'
    def remove(self, path):
        # type: (Text) -> None
        self.check()                                                                                                                                                        _path = self.validatepath(path)
        sys_path = self._to_sys_path(_path)                                                                                                                                 with convert_os_errors("remove", path):
            try:
>               os.remove(sys_path)
E               PermissionError: [Errno 1] Operation not permitted: b'/tmp/tmpp8tsivm8/test.ufo/glyphs.layer 1'

/usr/pkg/lib/python3.12/site-packages/fs/osfs.py:368: PermissionError

During handling of the above exception, another exception occurred:

self = <ufoLib.UFO3_test.UFO3WriteLayersTestCase testMethod=testRemoveLayer>

    def testRemoveLayer(self):
        self.makeUFO()
        writer = UFOWriter(self.ufoPath)
>       writer.deleteGlyphSet("layer 1")

and

__________________________________________________________ UFO3WriteLayersTestCase.testRemoveDefaultLayer __________________________________________________________

self = OSFS('/tmp/tmp69t3ma47/test.ufo'), path = 'glyphs'

    def remove(self, path):
        # type: (Text) -> None
        self.check()
        _path = self.validatepath(path)
        sys_path = self._to_sys_path(_path)
        with convert_os_errors("remove", path):
            try:
>               os.remove(sys_path)
E               PermissionError: [Errno 1] Operation not permitted: b'/tmp/tmp69t3ma47/test.ufo/glyphs'

/usr/pkg/lib/python3.12/site-packages/fs/osfs.py:368: PermissionError

During handling of the above exception, another exception occurred:

self = <ufoLib.UFO3_test.UFO3WriteLayersTestCase testMethod=testRemoveDefaultLayer>

    def testRemoveDefaultLayer(self):
        self.makeUFO()
        writer = UFOWriter(self.ufoPath)
>       writer.deleteGlyphSet("public.default")

Tests/ufoLib/UFO3_test.py:4480:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/pkg/lib/python3.12/site-packages/fontTools/ufoLib/__init__.py:1655: in deleteGlyphSet
    self.removePath(foundDirectory, removeEmptyParents=False)
/usr/pkg/lib/python3.12/site-packages/fontTools/ufoLib/__init__.py:1150: in removePath                                                                                  self.fs.remove(path)
/usr/pkg/lib/python3.12/site-packages/fs/osfs.py:366: in remove
    with convert_os_errors("remove", path):
/usr/pkg/lib/python3.12/site-packages/fs/error_tools.py:89: in __exit__
    reraise(fserror, fserror(self._path, exc=exc_value), traceback)
/usr/pkg/lib/python3.12/site-packages/six.py:718: in reraise
    raise value.with_traceback(tb)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = OSFS('/tmp/tmp69t3ma47/test.ufo'), path = 'glyphs'

    def remove(self, path):
        # type: (Text) -> None
        self.check()
        _path = self.validatepath(path)
        sys_path = self._to_sys_path(_path)
        with convert_os_errors("remove", path):
            try:
>               os.remove(sys_path)                                                                                                                                 E               fs.errors.PermissionDenied: permission denied
                                                                                                                                                                    /usr/pkg/lib/python3.12/site-packages/fs/osfs.py:368: PermissionDenied
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

1 participant