File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
1
.PHONY : test
2
2
test :
3
3
python -m pytest --version
4
- python -m pytest --xvfb-backend=xvfb - v test/
4
+ python -m pytest -v test/
5
5
6
6
7
7
.PHONY : lint
Original file line number Diff line number Diff line change @@ -55,8 +55,7 @@ make test
55
55
```
56
56
57
57
Unit tests require ` xvfb ` (X Virtual Framebuffer) to test the GUI. If ` xvfb ` is not
58
- installed, you'll receive ` ERROR: xvfb backend xvfb requested but not installed ` .
59
- Install with:
58
+ installed, GUI tests will be skipped. Install with:
60
59
61
60
``` bash
62
61
sudo apt install xvfb
Original file line number Diff line number Diff line change 1
1
from pathlib import Path
2
2
3
+ import pytest
4
+ import pytest_xvfb
5
+
3
6
from viscm .cli import _make_window
4
7
8
+ xvfb_installed = pytest_xvfb .xvfb_instance is not None
9
+
5
10
11
+ @pytest .mark .skipif (
12
+ not xvfb_installed ,
13
+ reason = "Xvfb must be installed for this test." ,
14
+ )
6
15
class TestGui :
7
16
def test_gui_view_opens (self , qtbot ):
8
17
window = _make_window (
You can’t perform that action at this time.
0 commit comments