#!/bin/sh
set -eu

echo "== Testing python3-ruff module import =="
python3 -c "
import ruff
bin_path = ruff.find_ruff_bin()
print(f'Found ruff binary at: {bin_path}')
import os
assert os.path.exists(bin_path), f'{bin_path} does not exist'
assert os.access(bin_path, os.X_OK), f'{bin_path} is not executable'
"

echo "== Testing python3 -m ruff CLI invocation =="
python3 -m ruff --version

echo "PASS: python3-ruff tests completed successfully"
