I'm trying to implement executing typogrify test suite during building package and I cannot finmd details about how to do that.
May I ask for some hints/guideline?
+ cd typogrify-2.0.7
+ /usr/bin/python3 setup.py test
running test
WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.
running egg_info
writing typogrify.egg-info/PKG-INFO
writing dependency_links to typogrify.egg-info/dependency_links.txt
writing requirements to typogrify.egg-info/requires.txt
writing top-level names to typogrify.egg-info/top_level.txt
reading manifest file 'typogrify.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'typogrify.egg-info/SOURCES.txt'
running build_ext
Traceback (most recent call last):
File "setup.py", line 4, in <module>
setup(
File "/usr/lib/python3.8/site-packages/setuptools/__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "/usr/lib64/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib64/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib64/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3.8/site-packages/setuptools/command/test.py", line 238, in run
self.run_tests()
File "/usr/lib/python3.8/site-packages/setuptools/command/test.py", line 256, in run_tests
test = unittest.main(
File "/usr/lib64/python3.8/unittest/main.py", line 100, in __init__
self.parseArgs(argv)
File "/usr/lib64/python3.8/unittest/main.py", line 124, in parseArgs
self._do_discovery(argv[2:])
File "/usr/lib64/python3.8/unittest/main.py", line 244, in _do_discovery
self.createTests(from_discovery=True, Loader=Loader)
File "/usr/lib64/python3.8/unittest/main.py", line 154, in createTests
self.test = loader.discover(self.start, self.pattern, self.top)
File "/usr/lib64/python3.8/unittest/loader.py", line 349, in discover
tests = list(self._find_tests(start_dir, pattern))
File "/usr/lib64/python3.8/unittest/loader.py", line 405, in _find_tests
tests, should_recurse = self._find_test_path(
File "/usr/lib64/python3.8/unittest/loader.py", line 483, in _find_test_path
tests = self.loadTestsFromModule(package, pattern=pattern)
File "/usr/lib/python3.8/site-packages/setuptools/command/test.py", line 55, in loadTestsFromModule
tests.append(self.loadTestsFromName(submodule))
File "/usr/lib64/python3.8/unittest/loader.py", line 191, in loadTestsFromName
return self.loadTestsFromModule(obj)
File "/usr/lib/python3.8/site-packages/setuptools/command/test.py", line 55, in loadTestsFromModule
tests.append(self.loadTestsFromName(submodule))
File "/usr/lib64/python3.8/unittest/loader.py", line 191, in loadTestsFromName
return self.loadTestsFromModule(obj)
File "/usr/lib/python3.8/site-packages/setuptools/command/test.py", line 41, in loadTestsFromModule
tests.append(TestLoader.loadTestsFromModule(self, module))
File "/usr/lib64/python3.8/unittest/loader.py", line 123, in loadTestsFromModule
if isinstance(obj, type) and issubclass(obj, case.TestCase):
File "/usr/lib/python3.8/site-packages/django/utils/functional.py", line 240, in inner
self._setup()
File "/usr/lib/python3.8/site-packages/django/conf/__init__.py", line 63, in _setup
raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Requested settings, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
I'm trying to implement executing typogrify test suite during building package and I cannot finmd details about how to do that. May I ask for some hints/guideline?