Git Product home page Git Product logo

f17507-project's Introduction

ReadME_507F17project1

This python program is used for testing the "SI507F17_project1_cards" python program works like what the description says. In this program, I only use the package "Unittest".

  • For class Card

    • Use the first three methods to test if all inputs are correct.
    • Test the str of class card by the instance "self.card0" which is created in "setUp".
    • Create a deck which is same as the deck in description, then use it to compare with the deck made by original program, see if they are same.
  • For class Deck

    • Test the type of information included in "cards" list.
    • Test the "pop_card", see if it can be used 52 times.
    • Test "shuffle": create a cope of list "cards" as cards_string0, then shuffle the list "cards" and copy it as cards_string1. See if cards_string0 is same as cards_string1.
    • Test "replace_card" in 2 situations: 1. Whether the replace_card can add a card to the deck If the deck does not have this card; 2. If the deck has the same card I want to add.
    • Test "sort_cards", see if it works for a complete deck and an incomplete deck, such as lacking of one suit)
    • Test "deal_hand", see if it works for any hand size.
  • For play_war_game

    • see if the game result is right
  • For show_song:

    • Check the type of show_song()
    • Given a key word, check if it is in the output string.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.