"""The existing output is the compatibility baseline for the tutorial."""

import subprocess
import sys
import unittest
from pathlib import Path


class ExportTest(unittest.TestCase):
    def test_text_output(self):
        result = subprocess.run(
            [sys.executable, str(Path(__file__).with_name("export.py"))],
            capture_output=True, text=True, check=True,
        )
        self.assertEqual(result.stdout, "Ada: engineer\nLin: reviewer\n")
        self.assertEqual(result.stderr, "")


if __name__ == "__main__":
    unittest.main()
