Skip to content

Commit 521e31d

Browse files
committed
V3 stable
documentacion update
1 parent cd10ef4 commit 521e31d

4 files changed

Lines changed: 71 additions & 3 deletions

File tree

.github/workflows/python-app.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Install system dependencies
2525
run: |
2626
sudo apt-get update
27-
sudo apt-get install -y xvfb libgl1-mesa-glx libglib2.0-0
27+
sudo apt-get install -y xvfb libglib2.0-0 libxrender1 libxtst6 libxi6
2828
2929
- name: Cache pip dependencies
3030
uses: actions/cache@v3

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ python Adatavision.py
4040
### Opción 2: Instalación con pip
4141
```bash
4242
# Instalar desde el repositorio
43-
pip install git+https://github.com/tu-usuario/AdataVision.git
43+
pip install git+https://github.com/JahirWH/AdataVision.git
4444

4545
# Ejecutar
4646
adatavision

conftest.py

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
"""
2+
Configuración de pytest para AdataVision
3+
"""
4+
import pytest
5+
import os
6+
import sys
7+
8+
def pytest_configure(config):
9+
"""Configuración de pytest"""
10+
# Agregar marcadores personalizados
11+
config.addinivalue_line(
12+
"markers", "gui: marks tests that require GUI (skip in CI)"
13+
)
14+
config.addinivalue_line(
15+
"markers", "slow: marks tests as slow (deselect with '-m \"not slow\"')"
16+
)
17+
config.addinivalue_line(
18+
"markers", "integration: marks tests as integration tests"
19+
)
20+
config.addinivalue_line(
21+
"markers", "unit: marks tests as unit tests"
22+
)
23+
24+
def pytest_collection_modifyitems(config, items):
25+
"""Modificar items de colección de tests"""
26+
# Saltar tests de GUI en CI
27+
if os.environ.get('CI') == 'true':
28+
skip_gui = pytest.mark.skip(reason="Skip GUI tests in CI environment")
29+
for item in items:
30+
if "gui" in item.keywords:
31+
item.add_marker(skip_gui)
32+
33+
@pytest.fixture(scope="session")
34+
def qapp():
35+
"""Fixture para QApplication en tests"""
36+
if os.environ.get('CI') == 'true':
37+
# En CI, usar modo offscreen
38+
os.environ['QT_QPA_PLATFORM'] = 'offscreen'
39+
40+
try:
41+
from PySide6.QtWidgets import QApplication
42+
app = QApplication.instance()
43+
if app is None:
44+
app = QApplication([])
45+
yield app
46+
except ImportError:
47+
pytest.skip("PySide6 not available")
48+
except Exception as e:
49+
pytest.skip(f"QApplication not available: {e}")
50+
51+
@pytest.fixture
52+
def temp_file():
53+
"""Fixture para archivos temporales"""
54+
import tempfile
55+
import os
56+
57+
with tempfile.NamedTemporaryFile(delete=False) as f:
58+
temp_path = f.name
59+
60+
yield temp_path
61+
62+
# Limpiar
63+
try:
64+
os.unlink(temp_path)
65+
except OSError:
66+
pass

requirements-test.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ PySide6>=6.5.0
22
cryptography>=41.0.0
33
pytest>=6.0.0
44
pytest-mock>=3.0.0
5-
pytest-qt>=4.0.0
5+
pytest-qt>=4.0.0
6+
pytest-cov>=4.0.0
7+
flake8>=4.0.0

0 commit comments

Comments
 (0)