Skip to content

Commit

Permalink
Rename encapsulation as cards
Browse files Browse the repository at this point in the history
As mentioned in #19.

I’ve not checked if I have broken anything. It would be good if someone confident with Python could check it still runs before merging.
  • Loading branch information
mrmanc committed Mar 11, 2021
1 parent 7e4671e commit 9519b7c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
class Encapsulation:
class Cards:
def __init__(self):
pass

def runner(self):
encapsulation = Encapsulation()
deck_in_order = encapsulation.get_cards()
cards = Cards()
deck_in_order = cards.get_cards()
for card in deck_in_order:
print(card)

Expand Down Expand Up @@ -46,5 +46,5 @@ def get_cards(self):

return result

encapsulation = Encapsulation()
encapsulation.runner()
cards = Cards()
cards.runner()
8 changes: 4 additions & 4 deletions exercises/python/cards/test_encapsulation.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import unittest
from encapsulation import Encapsulation
from cards import Cards


class EncapsulationTest(unittest.TestCase):
class CardsTest(unittest.TestCase):

def test_get_deck_in_order_return_52_cards_correctly_formatted(self):
encapsulation = Encapsulation()
self.assertEqual(encapsulation.get_cards(), [
cards = Cards()
self.assertEqual(cards.get_cards(), [
"ace of clubs",
"2 of clubs",
"3 of clubs",
Expand Down

0 comments on commit 9519b7c

Please sign in to comment.