Avatar frames that follow the outline of the avatar (ring and parts hung on it), packs of frames that arrive from a catalog on the site by themselves, the frame shown to other members through the members service, save an avatar by user name, the diary of the mod, the seek bar on every video, the beta version line and its what is new, plus tests, the catalog builder, the sprites and the scripts that draw them. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
30 lines
1.3 KiB
Python
30 lines
1.3 KiB
Python
"""ProfileAddresses (the user name check and the picture addresses of a profile page) 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" / "media" / "ProfileAddresses.java"
|
|
HARNESS = ROOT / "tests" / "java" / "lihont" / "two" / "media" / "ProfileAddressesTest.java"
|
|
|
|
|
|
class ProfileAddressesTest(unittest.TestCase):
|
|
def test_names_pages_and_hosts(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-profile-addresses-") as out:
|
|
subprocess.run([javac, "--release", "17", "-encoding", "UTF-8", "-Xlint:all", "-Werror", "-d", out, str(SOURCE), str(HARNESS)],
|
|
check=True, capture_output=True)
|
|
result = subprocess.run([java, "-cp", out, "lihont.two.media.ProfileAddressesTest"],
|
|
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()
|