def run(self, options, robot_class, **static_options):
        
        robot_file = abspath(inspect.getfile(robot_class))
        robot_path = dirname(robot_file)
        
        try_dirs = [
            abspath(join(robot_path, 'tests')),
            abspath(join(robot_path, '..', 'tests'))
        ]
        
        test_directory = try_dirs[0]
        
        for d in try_dirs:
            if exists(d):
                test_directory = d
                break
        else:
            os.makedirs(test_directory)
            
        print(test_directory % "Tests directory is %s")
        print()
        builtin_tests_file = join(test_directory, 'pyfrc_test.py')
        if exists(builtin_tests_file):
            print('- pyfrc_test.py already exists')
        else:
            with open(builtin_tests_file, 'w') as fp:
                fp.write(builtin_tests)
            print("- builtin tests created at", builtin_tests_file)
        
        print()
        print("Robot tests can be ran via 'python3 robot.py test'")
dataset/ETHPy150Open robotpy/pyfrc/lib/pyfrc/mains/cli_add_tests.py/PyFrcAddTests.run/swapped operands of `%`