Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 1.6 KB

README.md

File metadata and controls

46 lines (33 loc) · 1.6 KB

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!