Skip to content
Merged

PEP8 #181

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions structural/proxy.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import print_function
import time


Expand Down Expand Up @@ -29,7 +29,8 @@ class NoTalkProxy(Proxy):
def talk(self):
print("Proxy checking for Sales Manager availability")
time.sleep(0.1)
print("This Sales Manager will not talk to you whether he/she is busy or not")
print("This Sales Manager will not talk to you",
"whether he/she is busy or not")


if __name__ == '__main__':
Expand Down
10 changes: 8 additions & 2 deletions tests/test_flyweight.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,18 @@ def test_instances_shall_reference_same_object(self):
self.assertEqual(c1, c2)
self.assertEqual(id(c1), id(c2))

def test_instances_with_different_suit_shall_reference_different_objects(self):
def test_instances_with_different_suit(self):
"""
shall reference different objects
"""
c1 = Card('9', 'a')
c2 = Card('9', 'b')
self.assertNotEqual(id(c1), id(c2))

def test_instances_with_different_values_shall_reference_different_objects(self):
def test_instances_with_different_values(self):
"""
shall reference different objects
"""
c1 = Card('9', 'h')
c2 = Card('A', 'h')
self.assertNotEqual(id(c1), id(c2))
Expand Down