Skip to content

Commit

Permalink
Add a first simple test
Browse files Browse the repository at this point in the history
  • Loading branch information
prof committed Oct 15, 2019
1 parent 3eef22e commit fa70ef8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
8 changes: 8 additions & 0 deletions .vscode/settings.json
@@ -0,0 +1,8 @@
{
"python.testing.pytestArgs": [
"."
],
"python.testing.unittestEnabled": false,
"python.testing.nosetestsEnabled": false,
"python.testing.pytestEnabled": true
}
6 changes: 0 additions & 6 deletions main.py
Expand Up @@ -4,10 +4,4 @@ def __init__(self, title, author, sbn):
self.author = author
self.sbn = sbn

harry_potter = Book("Harry Potter e il calice di fuoco", "J.K.Rowling",1)
print(harry_potter.title)



#piccolo_principe = Book()
#print(piccolo_principe.title)
5 changes: 5 additions & 0 deletions test_book.py
@@ -0,0 +1,5 @@
from main import Book

def test_book_title():
harry_potter = Book("Harry Potter e il calice di fuoco", "J.K.Rowling",1)
assert harry_potter.title == "Harry Potter e il calice di fuoco"

0 comments on commit fa70ef8

Please sign in to comment.