ERROR with Standard Tests / Unit Tests

After having successfully built my Docker imagine I try can run the cmd:
./gradlew :airbyte-integrations:connectors:source-employment-hero:integrationTest

I get an issue with regards to the unitTestCoverage. I’ve been pulling my hair out on this for a few days and have gotten nowhere. Any help would be much appreciated.
Just for more info I am running this on a Apple M1 Pro chip but Ive followed the instructions on the Airbyte Github as well as that of Docker and the error still persists.

The error message is as follows.

Task :airbyte-integrations:bases:source-acceptance-test:_unitTestCoverage FAILED
[python] .venv/bin/python -m coverage run --data-file=unit_tests/.coverage.unitTest --rcfile=/Users/carlos/Documents/POI/Development/airbyte/pyproject.toml -m pytest -s unit_tests -c pytest.ini         

Traceback (most recent call last):
           File "/Users/carlos/Documents/POI/Development/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/pytest/__main__.py", line 5, in <module>
             raise SystemExit(pytest.console_main())
           File "/Users/carlos/Documents/POI/Development/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/_pytest/config/__init__.py", line 187, in console_main
             code = main()
           File "/Users/carlos/Documents/POI/Development/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/_pytest/config/__init__.py", line 143, in main
             config = _prepareconfig(args, plugins)
           File "/Users/carlos/Documents/POI/Development/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/_pytest/config/__init__.py", line 318, in _prepareconfig
             config = pluginmanager.hook.pytest_cmdline_parse(
           File "/Users/carlos/Documents/POI/Development/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/pluggy/hooks.py", line 286, in __call__
             return self._hookexec(self, self.get_hookimpls(), kwargs)
           File "/Users/carlos/Documents/POI/Development/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/pluggy/manager.py", line 93, in _hookexec
             return self._inner_hookexec(hook, methods, kwargs)
           File "/Users/carlos/Documents/POI/Development/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/pluggy/manager.py", line 84, in <lambda>
             self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
           File "/Users/carlos/Documents/POI/Development/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/pluggy/callers.py", line 203, in _multicall
             gen.send(outcome)
           File "/Users/carlos/Documents/POI/Development/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/_pytest/helpconfig.py", line 100, in pytest_cmdline_parse
             config = outcome.get_result()  # type: Config
           File "/Users/carlos/Documents/POI/Development/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/pluggy/callers.py", line 80, in get_result
             raise ex[1].with_traceback(ex[2])
           File "/Users/carlos/Documents/POI/Development/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/pluggy/callers.py", line 187, in _multicall
             res = hook_impl.function(*args)
           File "/Users/carlos/Documents/POI/Development/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1003, in pytest_cmdline_parse
             self.parse(args)
           File "/Users/carlos/Documents/POI/Development/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1280, in parse
             self._preparse(args, addopts=addopts)
           File "/Users/carlos/Documents/POI/Development/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1172, in _preparse
             self.pluginmanager.load_setuptools_entrypoints("pytest11")
           File "/Users/carlos/Documents/POI/Development/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/pluggy/manager.py", line 299, in load_setuptools_entrypoints
             plugin = ep.load()
           File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/metadata/__init__.py", line 162, in load
             module = import_module(match.group('module'))
           File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py", line 126, in import_module
             return _bootstrap._gcd_import(name[level:], package, level)
           File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
           File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
           File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
           File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
           File "/Users/carlos/Documents/POI/Development/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/_pytest/assertion/rewrite.py", line 162, in exec_module
             source_stat, co = _rewrite_test(fn, self.config)
           File "/Users/carlos/Documents/POI/Development/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/_pytest/assertion/rewrite.py", line 359, in _rewrite_test
             co = compile(tree, fn_, "exec", dont_inherit=True)
         TypeError: required field "lineno" missing from alias
         /Users/carlos/Documents/POI/Development/airbyte/airbyte-integrations/bases/source-acceptance-test/.venv/lib/python3.10/site-packages/coverage/control.py:788: CoverageWarning: No data was collected. (no-data-collected)
           self._warn("No data was collected.", slug="no-data-collected")

 Task :airbyte-integrations:bases:base-normalization:isortFormat
         Skipped 4 files

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':airbyte-integrations:bases:source-acceptance-test:_unitTestCoverage'.
 Python call failed: .venv/bin/python -m coverage run --data-file=unit_tests/.coverage.unitTest --rcfile=/Users/carlos/Documents/POI/Development/airbyte/pyproject.toml -m pytest -s unit_tests -c pytest.ini

Any help would be very much appreciated, I am totally blocked on how to proceed.

Augustin Lafanechère can you take a look in this issue?

Hey @Carlos,
I think this is probably related to your python environment.
You are running Python 3.10 while the majority of our python connectors runs on Python 3.9. I think the specific error you have is related to the pytest. version. Upgrading pytest to >= 6.2.5, or using Python 3.9.11 in your connector project will probably solve your problem.

I downgraded Python3 to 3.9.11 and updated to the latest version of pytest which is 7.1.1 as you see in the screenshot. However when I run ./gradlew :airbyte-integrations:connectors:source-employment-hero:integrationTest it shows all the packages and their version and I noticed that the pytest version isn’t updated. This was done after updating the pytets to 7.1.1

I updated the test requirements to the latest version of pytest and it worked. Thanks

Hi there from the Community Assistance team.
We’re letting you know about an issue we discovered with the back-end process we use to handle topics and responses on the forum. If you experienced a situation where you posted the last message in a topic that did not receive any further replies, please open a new topic to continue the discussion. In addition, if you’re having a problem and find a closed topic on the subject, go ahead and open a new topic on it and we’ll follow up with you. We apologize for the inconvenience, and appreciate your willingness to work with us to provide a supportive community.