You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the workflow to run api_tests.py? I always get
ERROR: test_tank_units (__main__.TestAPI)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./api_tests.py", line 273, in test_tank_units
drive = MoveTank(OUTPUT_A, OUTPUT_B)
File "/home/robot/ev3dev-lang-python/ev3dev2/motor.py", line 1699, in __init__
MotorSet.__init__(self, motor_specs, desc)
File "/home/robot/ev3dev-lang-python/ev3dev2/motor.py", line 1548, in __init__
self.motors[motor_port] = motor_class(motor_port)
File "/home/robot/ev3dev-lang-python/ev3dev2/motor.py", line 1021, in __init__
super(LargeMotor, self).__init__(address, name_pattern, name_exact, driver_name=['lego-ev3-l-motor', 'lego-nxt-motor'], **kwargs)
File "/home/robot/ev3dev-lang-python/ev3dev2/motor.py", line 316, in __init__
super(Motor, self).__init__(self.SYSTEM_CLASS_NAME, name_pattern, name_exact, **kwargs)
File "/home/robot/ev3dev-lang-python/ev3dev2/__init__.py", line 201, in __init__
chain_exception(DeviceNotFound("%s is not connected." % self), None)
File "/home/robot/ev3dev-lang-python/ev3dev2/__init__.py", line 38, in chain_exception
raise exception from cause
ev3dev2.DeviceNotFound: LargeMotor(ev3-ports:outA) is not connected.
Activity
ddemidov commentedon Nov 1, 2018
This is how Travis does it:
ev3dev-lang-python/.travis.yml
Lines 18 to 20 in ae97053
WasabiFan commentedon Nov 1, 2018
You should just be able to run the file with python3. Make sure you have submodules cloned and that they are up-to-date.
dwalton76 commentedon Nov 2, 2018
On a ubuntu machine I can run them, I did
but the exact same steps on an EV3 or pi3+brickpi3 gives me the
ev3dev2.DeviceNotFound: LargeMotortraceback.dwalton76 commentedon Nov 2, 2018
I see what is happening....
ev3dev2/_platform/fake.pyis not being used if you run the tests from a device that is running ev3dev.[-]How to run api_tests.py?[/-][+]api_tests fail to run on EV3[/+]WasabiFan commentedon Nov 4, 2018
Ah, I see; you were running it on the EV3. I misunderstood the original post. Is there a use case for running the tests directly on the EV3?
dwalton76 commentedon Nov 4, 2018
I do all of my dev on either a brickpi or ev3 so for me I would use this all the time.
WasabiFan commentedon Nov 4, 2018
Ah, I get it. That sounds good to me then.
suppress unittest ResourceWarning messages (#556)