From 9519b7c0578c9814e1aabe0fbafc94d0b627fa3e Mon Sep 17 00:00:00 2001 From: Mark Crossfield Date: Thu, 11 Mar 2021 19:07:35 +0000 Subject: [PATCH] Rename encapsulation as cards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- exercises/python/cards/{encapsulation.py => cards.py} | 10 +++++----- exercises/python/cards/test_encapsulation.py | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) rename exercises/python/cards/{encapsulation.py => cards.py} (89%) diff --git a/exercises/python/cards/encapsulation.py b/exercises/python/cards/cards.py similarity index 89% rename from exercises/python/cards/encapsulation.py rename to exercises/python/cards/cards.py index c6a9ee8..b67d441 100644 --- a/exercises/python/cards/encapsulation.py +++ b/exercises/python/cards/cards.py @@ -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) @@ -46,5 +46,5 @@ def get_cards(self): return result -encapsulation = Encapsulation() -encapsulation.runner() +cards = Cards() +cards.runner() diff --git a/exercises/python/cards/test_encapsulation.py b/exercises/python/cards/test_encapsulation.py index b69c44a..6aa45d5 100644 --- a/exercises/python/cards/test_encapsulation.py +++ b/exercises/python/cards/test_encapsulation.py @@ -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",