← Back to team overview

nagios-charmers team mailing list archive

[Bug 1983398] Re: Update pytest fixture for async functions

 

** Changed in: charm-nagios
       Status: New => Fix Committed

** Merge proposal linked:
   https://code.launchpad.net/~txiao/charm-nagios/+git/charm-nagios/+merge/427859

** Changed in: charm-nagios
       Status: Fix Committed => In Progress

** Changed in: charm-nagios
     Assignee: (unassigned) => Tianqi Xiao (txiao)

** Changed in: charm-thruk-agent
       Status: New => In Progress

** Changed in: charm-thruk-agent
     Assignee: (unassigned) => Tianqi Xiao (txiao)

** Merge proposal linked:
   https://code.launchpad.net/~txiao/charm-thruk-agent/+git/charm-thruk-agent/+merge/427862

** Changed in: charm-infra-node
       Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of Nagios
Charm developers, which is subscribed to Nagios Charm.
https://bugs.launchpad.net/bugs/1983398

Title:
  Update pytest fixture for async functions

Status in charm-advanced-routing:
  New
Status in charm-infra-node:
  Fix Committed
Status in logrotate-charm:
  New
Status in Nagios Charm:
  In Progress
Status in charm-sysconfig:
  New
Status in Thruk Agent Charm:
  In Progress

Bug description:
  Starting from `pytest-asyncio`'s most recent release (version 0.19.0),
  strict mode is enforced by default [1], which requires the usage of
  `@pytest.mark.asyncio` and `@pytest_asyncio.fixture` [2]. Without
  these markers, tests and fixtures are not considered as asyncio-
  driven, resulting functional tests failures.

  For charms using pytest framework, we need to update their functional
  tests by replacing the current used `@pytest.fixture` with
  `@pytest_asyncio.fixture` in test files.

  
  [1]: https://github.com/pytest-dev/pytest-asyncio/issues/390
  [2]: https://github.com/pytest-dev/pytest-asyncio#strict-mode

To manage notifications about this bug go to:
https://bugs.launchpad.net/charm-advanced-routing/+bug/1983398/+subscriptions



References