In a message of Fri, 24 Apr 2015 14:09:45 -0500, boB Stepp writes:

>First question: What testing modules/frameworks should I start out
>with? Doing a quick scan of the books I have, mention is made of
>doctest and unittest modules in the Python standard libraries. But
>mention is also made of two third party modules, nose and pytest. What
>would be the most productive use of my learning time while entering
>TDD waters for the first time? And beyond automating unit tests, how
>is integration testing done in an automated fashion? Will I require
>special software for this? And then there is user interface testing...

You need the testing-in-python mailing list.  Come on over ...
http://lists.idyll.org/listinfo/testing-in-python
You will find lots of familiar faces (email addresses) from this
list there.  Nose and py.test are very similar.  I happen to like
them better than unittest, but if you cannot install software on
your solaris machines, you may be better off with unittest which
comes with Python, which I assume you do have on your Solaris boxes.

>And what would be the best approach to integrating Git with these
>efforts? Just how often does one commit one's code to the version
>control system? Or do I have some GCEs (Gross Conceptual Errors) here?
>Can Git be set up to automatically keep track of my code as I create
>and edit it?

Depending on what you mean by that, the answer is 'no' or 'that is
exactly what git does, there is no way to _prevent_ this'.

You have to tell git when you would like to save your work.
It doesn't work like autosaving in an editor -- hah hah, she has typed
300 chars now,  (or it has been 5 minutes now) time to autosave -- if
you never tell git to save the work, it will never get saved.

So what you typically do is write a test, tell git to save it, run the
test, have it fail, write some more code and run  all the tests again,
have them pass, tell git to save it, write another test ...

If in the 'write some more code' part, you get the itch 'it would be
really bad if my laptop died and I lost all this work' you tell git to
save immediately and keep on going.

There is a whole other layer about 'how to share your code with other
people, politely, when several of you are working on the same project
at one time, but if you are a one man team, you won't have to worry
about that for a while.

>And as to automated testing: I really, ..., really would like to
>implement it on my side projects at work. But all such programs start
>in a proprietary scripting environment, which can call external Python
>(or other languages) scripts. The resulting final program is almost
>always an unavoidable amount of propriety scripting language (Which I
>always strive to minimize the amount of.), Solaris shell
>commands/scripts and Python. As I have been learning more Python and
>implementing it at work, I have found that the most successful
>approach seems to be to first get all of the information I need out of
>the CSA (commercial software environment) upfront, save it in temp
>files, then call a Python script to start the heavy duty processing,
>do everything possible in Python, generate a "reload" script file that
>contains language the CSA understands, and finally run that inside the
>CSA. How do I go about automating the testing of something like this?
>And apply TDD write tests first principles?

You need the testing-in-python mailing list.  Whatever proprietary
thing you have  to integrate with, chances are somebody there has
been there, and done that already and has code you would be
welcome to use.

>And I would like to have all of that under version control, too. But
>while I am allowed to write my own programs for this CSA, I am not
>allowed to install anything else, strange as this may sound! Since the
>only functional editors in these bare-bones Solaris 10 environments
>are some simplistic default editor that I do not know the name of and
>vi, I long ago gravitated to doing my actual coding on my Windows PC
>(Being careful to save things with Unix line endings.) and FTPing to
>the environments where these programs will actually run. I AM allowed
>to install anything I want (within reason)on my PC. So I am thinking
>install and use Git there?

Are you absolutely certain that you cannot install git on your bare-bones
Solaris 10 environments?  Or plug in a memory stick and run code from
there?  Because it would make your life so much easier ...
>
>And if successful automated testing can be done with this CSA
>situation, how difficult is it to backtrack and add test suites to
>stuff already written and being used? Are there special strategies and
>techniques for accomplishing such a feat?

Lots and lots.

>And any other suggestions to best start learning all of this as well
>as possible?
>
>As always, many thanks in advance!
>
>
>-- 
>boB

Laura

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to