View Single Post
  #3   Spotlight this post!  
Unread 09-04-2011, 20:56
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,043
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Python Testing Strategies -- How did you do it?

Quote:
Originally Posted by Jeanne Boyarsky View Post
Dustin,
Thanks for sharing this. I was hoping there was an easier way to do it of course, but knowing one team did this implies there is not. Have you considered contributing your library of stubs to the existing Python libraries (or packaging it separately) so other teams can use it? I think that is going to prove even more valuable than your "real code"

Jeanne
I think I'm going to release it all together [real + stubs + test harness] for the moment, since it's pretty specific to our team's robot right now. And the other thing too -- it's not like it's particularly hard to do this stuff once you have a good idea how to implement it. I think it took me 3 hours total to write the test harness/fake wpilib and such.

In the past I made a more full-featured test harness for WPILib/C++, but I haven't really been motivated to do that for python yet. Maybe I'll play with PyQT at some point.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote