#!/usr/bin/env python
#
# Test cases for tournament.py

from tournament_extra import *
import os


def clearScreen():
    os.system('cls' if os.name == 'nt' else 'clear')


def testDeleteTournaments():
    deleteMatches()
    print "1. Tournaments can be deleted."


def testDeleteMatches():
    deleteMatches()
    print "2. Matches can be deleted."


def testDeletePlayers():
    deletePlayers()
    print "3. Players can be deleted."


def testCountTournaments():
    deleteTournaments()
    c = countTournaments()
    if c == '0':
        raise TypeError(
            "countTournaments() should return numeric zero, not string '0'.")
    if c != 0:
        raise ValueError("After deleting, countTournaments should return zero.")
    print "4. After deleting, countTournaments() returns zero."


def testCountMatches():