Skip to content

Commit a9e53ff

Browse files
Update pyxel recipe: use URL source and refactor tests to functions
Co-authored-by: IsabelParedes <23283243+IsabelParedes@users.noreply.github.com>
1 parent 77903fb commit a9e53ff

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

recipes/recipes_emscripten/pyxel/recipe.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ package:
77
version: ${{ version }}
88

99
source:
10-
- git: https://github.com/kitao/pyxel.git
11-
tag: v${{ version }}
10+
url: https://github.com/kitao/pyxel/archive/refs/tags/v${{ version }}.tar.gz
11+
sha256: da328a30f76dae5f9df0130ae746248f8ef23efba6f3a5e5429df34ba81c345a
1212

1313
build:
1414
number: 0
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
#!/usr/bin/env python
2-
3-
try:
1+
def test_import_pyxel():
2+
"""Test that pyxel can be imported successfully."""
43
import pyxel
54
print("pyxel import successful")
6-
7-
# Test basic functionality
5+
6+
7+
def test_pyxel_version():
8+
"""Test that pyxel version is accessible."""
9+
import pyxel
810
print(f"pyxel version: {pyxel.__version__}")
11+
12+
13+
def test_pyxel_basic_attributes():
14+
"""Test that basic pyxel attributes are available."""
15+
import pyxel
916

1017
# Try to access some basic pyxel attributes
1118
assert hasattr(pyxel, 'init'), "pyxel.init not found"
12-
assert hasattr(pyxel, 'run'), "pyxel.run not found"
19+
assert hasattr(pyxel, 'run'), "pyxel.run not found"
1320
assert hasattr(pyxel, 'cls'), "pyxel.cls not found"
1421

15-
print("All basic pyxel imports and attributes are available")
16-
17-
except ImportError as e:
18-
print(f"Failed to import pyxel: {e}")
19-
raise
20-
except Exception as e:
21-
print(f"Error during pyxel testing: {e}")
22-
raise
22+
print("All basic pyxel imports and attributes are available")

0 commit comments

Comments
 (0)