Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-15728

Setting "cassandra_dir" in pytest.ini has no effect

    XMLWordPrintableJSON

Details

    Description

      Setting cassandra_dir in pytest.ini should not require specifying --cassandra-dir on the command line:

      $ pytest cql_tracing_test.py
      ============================================================================================================ test session starts =============================================================================================================
      platform linux -- Python 3.6.9, pytest-3.6.4, py-1.8.1, pluggy-0.7.1
      rootdir: /home/nastra/Development/pycharm-projects/cassandra-dtest, inifile: pytest.ini
      plugins: timeout-1.3.4, flaky-3.6.1
      timeout: 900.0s
      timeout method: signal
      timeout func_only: False
      collecting 4 items                                                                                                                                                                                                                           
      INTERNALERROR> Traceback (most recent call last):
      INTERNALERROR>   File "/home/nastra/dtest/lib/python3.6/site-packages/_pytest/main.py", line 178, in wrap_session
      INTERNALERROR>     session.exitstatus = doit(config, session) or 0
      INTERNALERROR>   File "/home/nastra/dtest/lib/python3.6/site-packages/_pytest/main.py", line 214, in _main
      INTERNALERROR>     config.hook.pytest_collection(session=session)
      INTERNALERROR>   File "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/hooks.py", line 258, in __call__
      INTERNALERROR>     return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
      INTERNALERROR>   File "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/manager.py", line 67, in _hookexec
      INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
      INTERNALERROR>   File "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/manager.py", line 61, in <lambda>
      INTERNALERROR>     firstresult=hook.spec_opts.get('firstresult'),
      INTERNALERROR>   File "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 201, in _multicall
      INTERNALERROR>     return outcome.get_result()
      INTERNALERROR>   File "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 76, in get_result
      INTERNALERROR>     raise ex[1].with_traceback(ex[2])
      INTERNALERROR>   File "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 180, in _multicall
      INTERNALERROR>     res = hook_impl.function(*args)
      INTERNALERROR>   File "/home/nastra/dtest/lib/python3.6/site-packages/_pytest/main.py", line 224, in pytest_collection
      INTERNALERROR>     return session.perform_collect()
      INTERNALERROR>   File "/home/nastra/dtest/lib/python3.6/site-packages/_pytest/main.py", line 429, in perform_collect
      INTERNALERROR>     session=self, config=self.config, items=items
      INTERNALERROR>   File "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/hooks.py", line 258, in __call__
      INTERNALERROR>     return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
      INTERNALERROR>   File "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/manager.py", line 67, in _hookexec
      INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
      INTERNALERROR>   File "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/manager.py", line 61, in <lambda>
      INTERNALERROR>     firstresult=hook.spec_opts.get('firstresult'),
      INTERNALERROR>   File "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 201, in _multicall
      INTERNALERROR>     return outcome.get_result()
      INTERNALERROR>   File "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 76, in get_result
      INTERNALERROR>     raise ex[1].with_traceback(ex[2])
      INTERNALERROR>   File "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 180, in _multicall
      INTERNALERROR>     res = hook_impl.function(*args)
      INTERNALERROR>   File "/home/nastra/Development/pycharm-projects/cassandra-dtest/conftest.py", line 440, in pytest_collection_modifyitems
      INTERNALERROR>     raise Exception("Required dtest arguments were missing! You must provide either --cassandra-dir "
      INTERNALERROR> Exception: Required dtest arguments were missing! You must provide either --cassandra-dir or --cassandra-version. Refer to the documentation or invoke the help with --help.
      

      Attachments

        Issue Links

          Activity

            People

              eduard.tudenhoefner Eduard Tudenhoefner
              eduard.tudenhoefner Eduard Tudenhoefner
              Eduard Tudenhoefner
              Benjamin Lerer, Berenguer Blasi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m