Skip to content

99 Bottles of OOP examples in python

Notifications You must be signed in to change notification settings

guy4261/99bottles_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

99bottles_python

99 Bottles of OOP examples in Python 3.

$ cat lib/bottles.py
$ python3.6 test/bottles_test.py
Traceback (most recent call last):
  File "test/bottles_test.py", line 10, in <module>
    from lib.bottles import Bottles
ImportError: cannot import name 'Bottles'
  • If you only put an empty Bottles class in this file, the same command would return valid unittest output like this:
$ cat lib/bottles.py
class Bottles(object):
    pass

$ python3.6 test/bottles_test.py
sssEssss
======================================================================
ERROR: test_the_first_verse (__main__.BottlesTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/bottles_test.py", line 20, in test_the_first_verse
    assert expected == Bottles().verse(99)
AttributeError: 'Bottles' object has no attribute 'verse'

----------------------------------------------------------------------
Ran 8 tests in 0.001s

FAILED (errors=1, skipped=7)

Happy Hacking!

About

99 Bottles of OOP examples in python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages