Skip to content

Commit

Permalink
Merge pull request #2 from Keda87/dev
Browse files Browse the repository at this point in the history
Add object __repr__ in class & Add test case for python 3.6
  • Loading branch information
Keda87 authored Oct 6, 2017
2 parents f95a2b6 + ed41406 commit 6868aad
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ python:
- "3.3"
- "3.4"
- "3.5"
- "3.6"

# Command to install dependency.
install: "pip install -r requirements.txt"
Expand Down
6 changes: 6 additions & 0 deletions chuck/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ def __init__(self):
self.joke = None
self.categories = None

def __repr__(self):
return '<{cls}: {joke}>'.format(
cls=self.__class__.__name__,
joke=self.joke
)


class ChuckNorris(object):

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name='chuck-norris-python',
version='1.0',
version='1.1',
packages=['chuck'],
license='MIT',
long_description='Python wrapper for "The Internet Chuck Norris Database" http://www.icndb.com/api/',
Expand Down

0 comments on commit 6868aad

Please sign in to comment.