Loading...

Follow Test and Code on Feedspot

Continue with Google
Continue with Facebook
or

Valid
Test and Code by Brian Okken - 6d ago

In the last episode, we talked about going from script to supported package.
I worked on a project called subark and did the packaging with flit.

Today's episode is a continuation where we add new features to a supported package and how to develop and test a flit based package.

Covered:

  • viewing stages of a project with git tags
  • flit support for editable installs
  • flit description entry in pyproject.toml to put README on pypi.
  • development dependencies in pyproject.toml
  • editor layout for optimal TDD-ing
  • test case grouping
  • modifications to traditional TDD that helps me develop faster.

code and command snippets from episode:

For git checkout of versions:

$ git clone https://github.com/okken/submark.git
$ cd submark
$ python3 -m venv venv --prompt submark
$ source ./bin/activate
(submark) $ git checkout v0.1
... etc ...
(submark) $ git checkout v0.7

To grab the latest again:

(submark) $ git checkout master

pyproject.toml change for README to show up on pypi:

[tool.flit.metadata]
...
description-file = "README.md"
...

Adding dev dependencies to pyproject.toml:

[tool.flit.metadata.requires-extra]
test = ["pytest", "pytest-cov", "tox"]

Installing in editable mode (in top level repo directory). works in mac, linux, windows:

(submark) $ flit install --pth-file

or for mac/linux:

(submark) $ flit install -s

Sponsored By:

Support Test & Code - Python Testing & Development

Links:

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

This episode is a story about packaging, and flit, tox, pytest, and coverage.
And an alternate solution to "using the src".

Python makes it easy to build simple tools for all kinds of tasks.
And it's great to be able to share small projects with others on your team, in your company, or with the world.

When you want to take a script from "just a script" to maintainable package, there are a few steps, but none of it's hard.

Also, the structure of the code layout changes to help with the growth and support.

Instead of just talking about this from memory, I thought it'd be fun to create a new project and walk through the steps, and report back in a kind of time lapse episode. It should be fun.

Here are the steps we walk through:

  • 0.1 Initial script and tests
  • 0.2 build wheel with flit
  • 0.3 build and test with tox
  • 0.4 move source module into a package directory
  • 0.5 move tests into tests directory

Sponsored By:

Support Test & Code - Python Testing & Development

Links:

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Some information about software testing is just wrong.
I'm not talking about opinions. I have lots of opinions and they differ from other peoples opinions. I'm talking about misinformation and old information that is no longer applicable.

I've ran across a few lateley that I want to address.

All of the following are wrong:

  1. Integrated tests can't work. I can prove it with wacky math.
  2. Tests have to be blazing fast or they won't get run.
  3. TDD is about design, not about testing.

This episode discusses why these are wrong.

Sponsored By:

Support Test & Code - Python Testing & Development

Links:

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Roadblocks to writing tests, and what to do about it.

Some developers either don't write tests, or don't like writing tests.
Why not? I love writing tests.
In this episode we examine lots of roadblocks to testing, and start coming up with solutions for these.

Sponsored By:

Support Test & Code - Python Testing & Development

Links:

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Creating maintainable test suites for complex systems. The episode describes some complexities involved with hardware testing, then shares techniques for shifting complexity out of the test cases.

  • quick overview of what test instruments are
  • discussion of API and communication with instruments
  • techniques for shifting complexity out of test cases

These techniques should apply to all test suites dealing with complex systems:

  • Creating test cases that are easy to read and debug and tell a story about what is being tested.
  • Pushing setup complexity into fixtures.
  • Pushing lengthy repetitive API call sets into helper functions.
  • Using stable, documented, interfaces.

Sponsored By:

Support Test & Code - Python Testing & Development

Links:

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Test Driven Development, TDD, can be intimidating to try.
Why is that? And how can we make it less scary?
That's what this episode is about.

Chris May is a Python developer and the co-founder of PyRVA, the Richmond Virginia Python group.
In this episode, Chris shares his experience with adding testing and TDD to his work flow.

I really enjoyed talking with Chris, and I think his story will help lots of people overcome testing anxiety.

Special Guest: Chris May.

Sponsored By:

Support Test & Code - Python Testing & Development

Links:

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Software testing, if done right, is done all the time, throughout the whole life of a software project. This is different than the verification and validation of a classical model of QA teams. It's more of a collaborative model that actually tries to help get great software out the door faster and iterate quicker.

One of the people at the forefront of this push is Alan Page. Alan and his podcast cohost Brent Jensen tried to boil down what modern testing looks like in the Modern Testing Principles.

I've got Alan here today, to talk about the principles, and also to talk about this transition from classical QA to testing specialists being embedded in software teams and then to software teams doing their own testing.

But that only barely scratches the surface of what we cover. I think you'll learn a lot from this discussion.

The seven principles of Modern Testing:

  1. Our priority is improving the business.
  2. We accelerate the team, and use models like Lean Thinking and the Theory of Constraints to help identify, prioritize and mitigate bottlenecks from the system.
  3. We are a force for continuous improvement, helping the team adapt and optimize in order to succeed, rather than providing a safety net to catch failures.
  4. We care deeply about the quality culture of our team, and we coach, lead, and nurture the team towards a more mature quality culture.
  5. We believe that the customer is the only one capable to judge and evaluate the quality of our product
  6. We use data extensively to deeply understand customer usage and then close the gaps between product hypotheses and business impact.
  7. We expand testing abilities and knowhow across the team; understanding that this may reduce (or eliminate) the need for a dedicated testing specialist.

Special Guest: Alan Page.

Sponsored By:

Support Test & Code - Software Testing, Development, Python

Links:

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

In this episode, I talk with Derrick Mar, CTO and co-founder of Pathrise.
This is the episode you need to listen to to get ready for software interviews.

  • We discuss four aspects of technical interviews that interviewers are looking for:

    • communication
    • problem solving
    • coding
    • verification
  • How to practice for the interview.

  • Techniques for synchronizing with interviewer and asking for hints.

  • Even how to ask the recruiter or hiring manager how to prepare for the interview.

If you or anyone you know has a software interview coming up, this episode will help you both feel more comfortable about the interview before you show up, and give you concrete tips on how to do better during the interview.

Special Guest: Derrick Mar.

Sponsored By:

Support Test & Code - Software Testing, Development, Python

Links:

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
Test and Code by Brian Okken - 2M ago

This is a "Yay! It's PyCon 2019" episode.
PyCon is very important to me.
But it's kinda hard to put a finger on why.
So I figured I'd ask more people to help explain why it's important.
I ask a few simple questions to people about Python and PyCon and get some great insights into both the language popularity and the special place this conference holds to many people.

Sponsored By:

Support Test & Code - Software Testing, Development, Python

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Some typical technical interview practices can be harmful and get in the way of hiring great people. April Wensel offers advice to help fix the technical interview process.

She recommends:

  • hire for mindset and attitude
  • look for empathy and mentorship skills
  • allow candidates to show their strengths instead of hunting for weaknesses
  • have the candidate leave feeling good about themselves and your company, regardless of the hiring decision

Some topics discussed:

  • interview questions to bring out stories of skills and successes
  • stereotype threat
  • diversity
  • interview hazing
  • white boards
  • coding challenges
  • unconscious bias
  • emotional intelligence
  • myth of talent shortage
  • pair programming and collaboration during interviews
  • mirrortocracy
  • cultural add vs cultural fit
  • empathy
  • mentoring

This episode is important for anyone going into a technical interview, as a candidate, as a hiring manager, or as a member of an interview team.

Special Guest: April Wensel.

Sponsored By:

Support Test & Code - Software Testing, Development, Python

Links:

Read for later

Articles marked as Favorite are saved for later viewing.
close
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Separate tags by commas
To access this feature, please upgrade your account.
Start your free month
Free Preview