Skip to content

Instantly share code, notes, and snippets.

@hackebrot
Created November 4, 2015 17:13
Show Gist options
  • Save hackebrot/b390c2eda250521b5a17 to your computer and use it in GitHub Desktop.
Save hackebrot/b390c2eda250521b5a17 to your computer and use it in GitHub Desktop.
create pytest tests
#! /usr/bin/env bash
set -e
set -u
set -x
for testdir in foobar hello/world example
do
mkdir -p $testdir
for i in {1..3}
do
counter=$(printf %02d $i)
testfile=$testdir/test_${testdir##*/}_$counter.py
echo "def test_sth(): assert True" > $testfile
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment