### Description

Close #2226

Refactors matplotlib tests:

- Prevent dangling selenium webdriver after test
- For asynchronous tests, use promise-await instead of selenium WebDriverWait
- Enable xfailed tests

<!--
- [ ] Add a [CHANGELOG](https://github.com/pyodide/pyodide/blob/main/docs/project/changelog.md) entry
- [ ] Add / update tests
- [ ] Add new / update outdated documentation
!-->

Refactor matplotlib tests. ### Description

Close #2226

Refactors matplotlib tests:

- Prevent dangling selenium webdriver after test
- For asynchronous tests, use promise-await instead of selenium WebDriverWait
- Enable xfailed tests

<!--
- [ ] Add a [CHANGELOG](https://github.com/pyodide/pyodide/blob/main/docs/project/changelog.md) entry
- [ ] Add / update tests
- [ ] Add new / update outdated documentation
!-->

# http://stackoverflow.com/questions/14553331/how-to-improve-numpy-performance-in-this-short-code
# pythran export repeating(float[], int)
# setup: import numpy as np ; a = np.random.rand(10000)
# run: repeating(a, 20)

import numpy as np


def repeating(x, nvar_y):
    nvar_x = x.shape[0]
    y = np.empty(nvar_x * (1 + nvar_y))
    y[0:nvar_x] = x[0:nvar_x]
    y[nvar_x:] = np.repeat(x, nvar_y)
    return y

# http://stackoverflow.com/questions/14553331/how-to-improve-numpy-performance-in-this-short-code
# pythran export repeating(float[], int)
# setup: import numpy as np ; a = np.random.rand(10000)
# run: repeating(a, 20)

import numpy as np


def repeating(x, nvar_y):
    nvar_x = x.shape[0]
    y = np.empty(nvar_x * (1 + nvar_y))
    y[0:nvar_x] = x[0:nvar_x]
    y[nvar_x:] = np.repeat(x, nvar_y)
    return y
