![]() May need to use “PythonPath/Lib/site-packages/pyfrc/mains/cli_test.py” in the argument to get to the FRC plugin. Py -3 robot.py test -v -k “M圜lass and not method” Py -3 robot.py test -v -maxfail=2 TestDirectory/ Py -3 robot.py test -v -fixtures -version Py -3 -m pytest -v robot_test.py -p pytest_plugin I am thinking of commands along the lines of: It may be nice to feed the pytest module call with additional pytest arguments “main.py” may need to be modified for this to happen, allowing arguments to pass through to the pytest.main() method call. It also seems like main.py is not passing along any additional arguments entered after “test” when calling “py -3 robot.py test”, but there is framework for it. It would be nice to be able to call pytest from the command line and run the unit test file, but it is failing for me. “main.py” appears to setup the variables for the robot_class, the PyTest arguments, and has the references to the classes needed, which may not be imported in the Unit Test classes (if the example tests are followed). ![]() I am not certain yet what is required to be configured in VS Code to get this setup to run outside of the main.py and PyFrcTest class methods. robot_path - The directory name that robot.py is located in.robot - This is whatever is returned from the run function in robot.py.fake_time - the FAKETIME object that controls time.It seems like there needs to be a way to feed the pytest_plugin.PyFrcPlugin location to PyTest when it is being started by the Test Explorer, and make sure that PyTest accesses the fixtures needed. I agree that it would be cool to have Unit Testing work in VS Code. Thank you for your response and the link to the PyFrcPlugin location.
0 Comments
Leave a Reply. |