Hi Adam,
Thanks for your reply.
It's indeed a pytest version issue. Resolved by using virtualenv as
mentioned in the doc :)

cheers

Le lun. 7 déc. 2020 à 21:44, Adam Holmberg <adam.holmb...@datastax.com> a
écrit :

> Hello. It looks like your environment might be using a newer version of
> pytest than is supported by these tests.
> https://docs.pytest.org/en/latest/deprecations.html#pytest-config-global
>
> Note that the requirements file specifies a fixed, older version of pytest:
>
> https://github.com/apache/cassandra-dtest/blob/192b70607a0c4a96f524bd5dc0c19c3a28f938f0/requirements.txt#L9
>
> On Fri, Dec 4, 2020 at 5:32 AM Ahmed Eljami <ahmed.elj...@gmail.com>
> wrote:
>
> > Hi folks,
> >
> > I'm trying to run dtest on local and getting the following error (I
> > configure it to run the only refresh_test.py test):
> >
> > $ pytest --cassandra-dir=/home/aeljami/workspace/git/cstar/cassandra
> >
> > ========================================================== test session
> > > starts ==========================================================
> > > platform linux -- Python 3.6.9, pytest-6.1.2, py-1.9.0, pluggy-0.13.1
> > > rootdir: /home/aeljami/workspace/git/cassandra-dtest, configfile:
> > > pytest.ini
> > > plugins: flaky-3.7.0
> > > collected 1 item
> > >
> > > refresh_test.py E
> > >                                                         [100%]
> > >
> > > ================================================================ ERRORS
> > > =================================================================
> > > ______________________________________ ERROR at setup of
> > > TestRefresh.test_refresh_deadlock_startup
> > > ______________________________________
> > >
> > > request = <SubRequest 'fixture_logging_setup' for <Function
> > > test_refresh_deadlock_startup>>
> > >
> > >     @pytest.fixture(scope="function", autouse=True)
> > >     def fixture_logging_setup(request):
> > >         # set the root logger level to whatever the user asked for
> > >         # all new loggers created will use the root logger as a
> template
> > >         # essentially making this the "default" active log level
> > >         log_level = logging.INFO
> > >         try:
> > >             # first see if logging level overridden by user as command
> > > line argument
> > > >           log_level_from_option =
> > pytest.config.getoption("--log-level")
> > > E           AttributeError: module 'pytest' has no attribute 'config'
> > >
> > > conftest.py:135: AttributeError
> > >
> >
> > ======================================================== short test
> summary
> > > info ========================================================
> > > ERROR refresh_test.py::TestRefresh::test_refresh_deadlock_startup -
> > > AttributeError: module 'pytest' has no attribute 'config'
> > >
> >
> > $ cat pytest.ini
> >
> > [pytest]
> > > cassandra_dir= /home/aeljami/workspace/git/cstar/cassandra
> > > python_files = refresh_test.py
> > > junit_suite_name = Cassandra dtests
> > > log_print = True
> > > log_level = INFO
> > > log_format = %(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s
> > > timeout = 900
> > >
> >
> >  Any idea please ?
> >
> > Thanks
> >
>
>
> --
> Adam Holmberg
> e. adam.holmb...@datastax.com
> w. www.datastax.com
>


-- 
Cordialement;

Ahmed ELJAMI

Reply via email to