I personnaly prefer the use of context managers for assertRaises, the code is more redable:

```python
with self.assertRaises(NotAbsolutePathError):
    SipsGateway.from_path(str(bin_path), str(pathfile_path))
```