#!/usr/bin/env python3
"""Control of the controls: blind one oracle (always says "same") and run the
control tests. The control for that language must now FAIL.
Usage: blind-oracle.py <test-oss-strip-comments.py> <ext>"""
import importlib.util, sys, unittest
spec = importlib.util.spec_from_file_location("t", sys.argv[1])
t = importlib.util.module_from_spec(spec); spec.loader.exec_module(t)
ext = sys.argv[2]
t.s.STRIPPERS[ext] = (t.s.STRIPPERS[ext][0], lambda src, new: True)
suite = unittest.defaultTestLoader.loadTestsFromTestCase(t.Controls)
sys.exit(not unittest.TextTestRunner(verbosity=2).run(suite).wasSuccessful())
