Reputation
51,289
Next tag badge:
99/100 score
22/20 answers
Badges
3 78 180
Newest
 Enlightened
Impact
~1.0m people reached

Jun
28
revised Using the command pattern for a sequence of tasks
typo fixed
Jun
27
comment Is there such a thing as the testing of automation?
Any program automates something. So any test of a program is also a "testing of automation" - that is pretty trivial. There is nothing special about this. If you have a more special kind of automation in mind, you should clarify this in your question (but the answer will still be just "yes", what else do you expect?). See also meta.programmers.stackexchange.com/questions/7273/…
Jun
27
comment Is there such a thing as the testing of automation?
@amon: read the question again, the OP is not talking about testing of "test automation".
Jun
27
comment Avoid FileUtil that is made for tests
Well, this looks good in theory, but IMHO you are somewhat reinventing the wheel. In Java or C# (and probably other environments), there is already something like an abstract stream class which can serve as an interface to either real files or in-memory data. So why invent an own mocking mechanism, if there is already one which can be used for testing in the framework?
Jun
27
revised Automatic code correction, Good or Bad?
deleted 2 characters in body
Jun
27
revised Does this code follow duck typing?
added 1 character in body
Jun
27
comment Is continuous integration more than just automatically testing code?
"when you are not doing CI, you can't fix them for weeks or months at a time", sorry, but I do not buy that. When you integrate a feature branch into the main line (for example, at the end of the month), you just have to fix all failing tests immediately. Or in other words, you have to do proper integration (which includes all tests), but not "continuous integration":
Jun
27
awarded  Enlightened
Jun
27
awarded  agile
Jun
27
awarded  python
Jun
26
revised Automatic code correction, Good or Bad?
added 148 characters in body
Jun
26
revised Does this code follow duck typing?
added 3 characters in body
Jun
26
revised Does this code follow duck typing?
added 216 characters in body
Jun
26
revised Automatic code correction, Good or Bad?
added 111 characters in body
Jun
26
revised Does this code follow duck typing?
comment changed
Jun
26
revised Does this code follow duck typing?
added 491 characters in body
Jun
26
comment Does this code follow duck typing?
an AttributeError will be raised if someone calls a non-existing method of an object (I tested it). You are correct, there could other things go wrong, and maybe different exceptions to be handled. But the gist of my answer is to demonstrate how to avoid isinstance, so the code will perfectly work with anything which "looks like a duck (sorry, dict)", and not only with dictionaries.
Jun
26
revised Automatic code correction, Good or Bad?
edited body
Jun
26
comment Does this code follow duck typing?
There is no bare except in my answer any more, maybe you missed my edit?.
Jun
26
answered Automatic code correction, Good or Bad?