L31H14-plus / tests /test_cli_defaults.py
iamrahulreddy's picture
Release L31H14+ code, results, and SAE checkpoint
938f0c7 verified
Raw
History Blame Contribute Delete
973 Bytes
from __future__ import annotations
import sys
import unittest
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
if str(ROOT) not in sys.path:
sys.path.insert(0, str(ROOT))
from mech_workbench.cli import _build_parser
class CliDefaultTests(unittest.TestCase):
def test_default_configs_are_current_4b_configs(self):
parser = _build_parser()
self.assertEqual(Path(parser.parse_args(["run"]).config).name, "discovery_4b.yaml")
self.assertEqual(Path(parser.parse_args(["ablate"]).config).name, "ablation_4b.yaml")
self.assertEqual(Path(parser.parse_args(["source"]).config).name, "discovery_4b.yaml")
self.assertEqual(Path(parser.parse_args(["validate"]).config).name, "discovery_4b.yaml")
def test_ablate_also_defaults_to_empty(self):
parser = _build_parser()
args = parser.parse_args(["ablate"])
self.assertEqual(args.also, "")
if __name__ == "__main__":
unittest.main()