allankp / pytest-testrail

pytest plugin for integration with TestRail, for creating testruns and updating results
MIT License
95 stars 125 forks source link

ConfigParser fallback issue in Python 2.7 #29

Closed brherger closed 6 years ago

brherger commented 6 years ago

Using: Python 2.7.9 pytest-testrail (1.0.1)

$ pytest test_me.py --testrail INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "c:\python27\lib\site-packages\_pytest\main.py", line 106, in wrap_session INTERNALERROR> config._do_configure() INTERNALERROR> File "c:\python27\lib\site-packages\_pytest\config.py", line 935, in _do_configure INTERNALERROR> self.hook.pytest_configure.call_historic(kwargs=dict(config=self)) INTERNALERROR> File "c:\python27\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 750, in call_historic INTERNALERROR> self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) INTERNALERROR> File "c:\python27\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 339, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "c:\python27\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 334, in <lambda> INTERNALERROR> _MultiCall(methods, kwargs, hook.spec_opts).execute() INTERNALERROR> File "c:\python27\lib\site-packages\_pytest\vendored_packages\pluggy.py", line 614, in execute INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "c:\python27\lib\site-packages\pytest_testrail\conftest.py", line 64, in pytest_configure INTERNALERROR> client = APIClient(config_manager.getoption('tr-url', 'url', 'API'), INTERNALERROR> File "c:\python27\lib\site-packages\pytest_testrail\conftest.py", line 104, in getoption INTERNALERROR> return self.cfg_file.get(section, cfg_name, fallback=None) INTERNALERROR> TypeError: get() got an unexpected keyword argument 'fallback'

I don't believe ConfigParser.get() supports fallback in Python 2.7.

mgeiger commented 6 years ago

PR #39 removes the fallback argument. It was not used in the code.