<filename>easy21_test.py
from easy21 import Easy21, Color,Action

def test_easy21_init_game():
  g = Easy21()
  assert(g.player<= 10)
  assert(g.player>=1)
  assert(g.dealer>=1)
  assert(g.dealer>=1)
  for i in range(1,1000):
    c = g.drawCard()
    assert(c.value < 11)
    assert(c.value > 0)

def test_losing():
  g = Easy21()
  r = None
  while True:
    x,r = g.step(Action.HIT)
    if r == -1:
      break
  assert(r == -1)

def test_losing_by_early_stick():
  g = Easy21()
  r = None
  g,r = g.step(Action.STICK)
  assert(r == -1)
<filename>easy21_test.py
from easy21 import Easy21, Color,Action

def test_easy21_init_game():
  g = Easy21()
  assert(g.player<= 10)
  assert(g.player>=1)
  assert(g.dealer>=1)
  assert(g.dealer>=1)
  for i in range(1,1000):
    c = g.drawCard()
    assert(c.value < 11)
    assert(c.value > 0)

def test_losing():
  g = Easy21()
  r = None
  while True:
    x,r = g.step(Action.HIT)
    if r == -1:
      break
  assert(r == -1)

def test_losing_by_early_stick():
  g = Easy21()
  r = None
  g,r = g.step(Action.STICK)
  assert(r == -1)