You should also add a test for the unsupported formats:

```python
    assert_raises(TypeError, inplace_swap_row, X_csr.tolil())
```