LihonT 2 Luna pre-release
Avatar shapes (circle, flower, rounded square, hexagon, heart, triangle): the own shape everywhere and, through the members service, the shapes other members published after proving the account with the code in the bio. Own accent colour and AMOLED, compact bottom bar, Material 3 profile and plus button, save menu (quality, audio only, photo posts without the watermark), fixed comment cards, "Luna (pre-release)" in the mod screen. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
29
tests/test_pictures.py
Normal file
29
tests/test_pictures.py
Normal file
@@ -0,0 +1,29 @@
|
||||
"""Pictures.id (the name of a profile picture inside an avatar address) on a real JVM."""
|
||||
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
import subprocess
|
||||
import tempfile
|
||||
import unittest
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
SOURCE = ROOT / "src" / "lihont" / "two" / "avatar" / "Pictures.java"
|
||||
HARNESS = ROOT / "tests" / "java" / "lihont" / "two" / "avatar" / "PicturesTest.java"
|
||||
|
||||
|
||||
class PicturesTest(unittest.TestCase):
|
||||
def test_picture_names(self):
|
||||
javac, java = shutil.which("javac"), shutil.which("java")
|
||||
if not javac or not java:
|
||||
raise RuntimeError("This test requires a JDK with java and javac")
|
||||
with tempfile.TemporaryDirectory(prefix="lihont-pictures-") as out:
|
||||
subprocess.run([javac, "--release", "17", "-encoding", "UTF-8", "-d", out, str(SOURCE), str(HARNESS)],
|
||||
check=True, capture_output=True)
|
||||
result = subprocess.run([java, "-cp", out, "lihont.two.avatar.PicturesTest"],
|
||||
capture_output=True, text=True, encoding="utf-8", timeout=60)
|
||||
self.assertEqual(result.returncode, 0, result.stdout + result.stderr)
|
||||
self.assertEqual(result.stdout.strip(), "PASS")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user