tdf#161947: test setuptools is imported on mac

Change-Id: Ie0908e610b3eade41aa5e7f1953ddaa55afce68d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170173
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
This commit is contained in:
Xisco Fauli 2024-07-09 01:40:23 +02:00
parent 36a8f4d1a0
commit f9cd7e2801
3 changed files with 36 additions and 0 deletions

View file

@ -51,6 +51,12 @@ $(eval $(call gb_Module_add_check_targets,pyuno, \
PythonTest_pyuno_pytests_testbz2 \
))
ifeq ($(OS),MACOSX)
$(eval $(call gb_Module_add_check_targets,pyuno, \
PythonTest_pyuno_pytests_testsetuptools \
))
endif
$(eval $(call gb_Module_add_subsequentcheck_targets,pyuno, \
PythonTest_pyuno_pytests_testcollections \
PythonTest_pyuno_pytests_insertremovecells \

View file

@ -0,0 +1,16 @@
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_PythonTest_PythonTest,pyuno_pytests_testsetuptools))
$(eval $(call gb_PythonTest_add_modules,pyuno_pytests_testsetuptools,$(SRCDIR)/pyuno/qa/pytests,\
testsetuptools \
))
# vim: set noet sw=4 ts=4:

View file

@ -0,0 +1,14 @@
import os
import unittest
# tdf#161947: make sure importing setuptools works on all platforms
class SetupToolsTest(unittest.TestCase):
def test_setuptools_import(self):
import setuptools
# use imported setuptools module for pyflakes
with open(os.devnull, "w") as devnull:
print(str(setuptools), file=devnull)
if __name__ == '__main__':
unittest.main()