pyodide / pytest-pyodide

Pytest plugin for testing applications that use Pyodide
Mozilla Public License 2.0
24 stars 14 forks source link

Prevent from overwriting global configurations #105

Closed ryanking13 closed 1 year ago

ryanking13 commented 1 year ago

This fixes a test failure that started to occur after #101.

! _pytest.outcomes.Exit: playwright failed to launch

The cause of the problem was that the combination of the pytester fixture and the pytest_configure hook is not very good. We use pytest_configure to manage global settings, but this function is called again when we run sub-tests using pytester, resulting in new global settings being overwritten.

So I added a check to prevent overwriting global settings once it is set.

hoodmane commented 1 year ago

Thanks @ryanking13 for fixing all of these. I opened #106 which hopefully fixes the last one...