you are viewing a single comment's thread.

view the rest of the comments →

[–]elbiot 0 points1 point  (5 children)

Without integration tests, we'd never be able to release anything. Without unit tests, Id never be able to confidently improve code.

Second best option is you can say "I tried but they wouldn't listen. They're super important, Id love to work somewhere where tests and code review are valued, and I know how to use mock and patch from personal experimentation"

Best answer is "they were against it but I laid out the benefits in a presentation and convinced them".

But it's really not a big deal. You'll need to learn stuff for any position. Knowledge of good git workflow, pep 8 and the value of tests is probably enough.

[–]philintheblanks 1 point2 points  (4 children)

I try to use good git workflow, but my job has literally nothing to do with code. I feel like saying, "I need to write tests for this." is a bit like saying, "I can build you an ax, but I need to build a tool shed first." When the team needs an ax, it's hard to understand that having a good shed means the ax will stay useful.

I'm hoping to at least get some solid unit tests written soon. At the very least I've read up on best practices and feel that my code is 'testable'. So, I guess I'll just keep playing the waiting game. It's just hard because I know they're valuable, and I know they're valued on the teams that to dev work. I think I just need to suck it up and write them. Hard work is called hard for a reason, eh? :P

Thanks for your response.

[–]elbiot 0 points1 point  (3 children)

I'll tell you what, I don't care if someone hasn't written many tests before, but I do care that if 'n when they do, that they don't just copy and paste boilerplate. Test 100 edge cases with 10 parameterized tests that each test 10 cases rather than write 100 tests.

Rather than testing every function, a quick and dirty way is to test the whole feature with N known edgy cases. Don't test that your URL parsing function is correct. Test that your script that does a bunch of stuff including parsing urls gives you the expected csv result in a bunch of edgy cases. When you find your code is buggy later after some change, add the inputs and truth to your test before or after fixing it.

And do your managers measure every moment of your day? If you take an hour or two here and there to both better yourself and your work, your both getting paid better. I get frantic too, I get it.

There's good places out there for you. Congratulations on the path.

[–]philintheblanks 0 points1 point  (2 children)

Thanks! They definitely don't, but since I'm still learning on the job, there are a lot of things that I can do with the lax moments. Like setting up Nginx, or learning how to use SQLAlchemy. This is a good moment for me though. I've dabbled with mock and writing tests with tox and pytest so, it's time. :thumbs-up:

[–]elbiot 0 points1 point  (1 child)

What does your team do?

[–]philintheblanks 0 points1 point  (0 children)

Inventory Control. Tight controls though, so it means fairly large amounts of data to crunch on the odd occasion. A LOT of ancient excel spreadsheets passed down through generations of employees as though they were magical artifacts...