frictionlessdata/tabulator-py

Rebase `python setup.py test` on invocation of pytest

jayvdb opened this issue · 5 comments

I know setup.py test is not in vogue anymore, but it is a no-op on Python 2.7, and a ugly error on Python 3.7

[  101s] + /usr/bin/python2 setup.py test
[  101s] running test
[  101s] running egg_info
[  101s] writing requirements to tabulator.egg-info/requires.txt
[  101s] writing tabulator.egg-info/PKG-INFO
[  101s] writing top-level names to tabulator.egg-info/top_level.txt
[  101s] writing dependency_links to tabulator.egg-info/dependency_links.txt
[  101s] writing entry points to tabulator.egg-info/entry_points.txt
[  101s] reading manifest file 'tabulator.egg-info/SOURCES.txt'
[  101s] reading manifest template 'MANIFEST.in'
[  101s] writing manifest file 'tabulator.egg-info/SOURCES.txt'
[  101s] running build_ext
[  102s] 
[  102s] ----------------------------------------------------------------------
[  102s] Ran 0 tests in 0.000s
[  102s] 
[  102s] OK
[  102s] + /usr/bin/python3 setup.py test
[  102s] running test
[  102s] running egg_info
[  102s] writing tabulator.egg-info/PKG-INFO
[  102s] writing dependency_links to tabulator.egg-info/dependency_links.txt
[  102s] writing entry points to tabulator.egg-info/entry_points.txt
[  102s] writing requirements to tabulator.egg-info/requires.txt
[  102s] writing top-level names to tabulator.egg-info/top_level.txt
[  102s] reading manifest file 'tabulator.egg-info/SOURCES.txt'
[  102s] reading manifest template 'MANIFEST.in'
[  102s] writing manifest file 'tabulator.egg-info/SOURCES.txt'
[  102s] running build_ext
[  104s] Traceback (most recent call last):
[  104s]   File "setup.py", line 105, in <module>
[  104s]     'Topic :: Software Development :: Libraries :: Python Modules'
[  104s]   File "/usr/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
[  104s]     return distutils.core.setup(**attrs)
[  104s]   File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
[  104s]     dist.run_commands()
[  104s]   File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
[  104s]     self.run_command(cmd)
[  104s]   File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
[  104s]     cmd_obj.run()
[  104s]   File "/usr/lib/python3.7/site-packages/setuptools/command/test.py", line 229, in run
[  104s]     self.run_tests()
[  104s]   File "/usr/lib/python3.7/site-packages/setuptools/command/test.py", line 251, in run_tests
[  104s]     exit=False,
[  104s]   File "/usr/lib/python3.7/unittest/main.py", line 100, in __init__
[  104s]     self.parseArgs(argv)
[  104s]   File "/usr/lib/python3.7/unittest/main.py", line 124, in parseArgs
[  104s]     self._do_discovery(argv[2:])
[  104s]   File "/usr/lib/python3.7/unittest/main.py", line 244, in _do_discovery
[  104s]     self.createTests(from_discovery=True, Loader=Loader)
[  104s]   File "/usr/lib/python3.7/unittest/main.py", line 154, in createTests
[  104s]     self.test = loader.discover(self.start, self.pattern, self.top)
[  104s]   File "/usr/lib/python3.7/unittest/loader.py", line 349, in discover
[  104s]     tests = list(self._find_tests(start_dir, pattern))
[  104s]   File "/usr/lib/python3.7/unittest/loader.py", line 406, in _find_tests
[  104s]     full_path, pattern, namespace)
[  104s]   File "/usr/lib/python3.7/unittest/loader.py", line 483, in _find_test_path
[  104s]     tests = self.loadTestsFromModule(package, pattern=pattern)
[  104s]   File "/usr/lib/python3.7/site-packages/setuptools/command/test.py", line 55, in loadTestsFromModule
[  104s]     tests.append(self.loadTestsFromName(submodule))
[  104s]   File "/usr/lib/python3.7/unittest/loader.py", line 205, in loadTestsFromName
[  104s]     test = obj()
[  104s] TypeError: validate() missing 1 required positional argument: 'source'
roll commented

@jayvdb
Thanks. We need to connect it with pytest.

Hi there, please can I take on this Issue & put in a PR for Hacktoberfest?

roll commented

@sadielbartholomew
Hi, sure!

Please go ahead and thanks for the help in advance.

Hi, your close/reopen reminded me of this Issue. Unfortunately I didn't have time to do it back in October & no longer have time, so I'll unassign myself. Sorry for the over-optimism!

roll commented

python setup.py test is deprecated now - pypa/setuptools#1684