from os import mkdir, getcwd
from bank import split_bank
from errors import BotError

class Dealer(object):
    def __init__(self):
        self.__feature = ""
        self.__scenarios = []

    def assign(self):
        try:
            with open("features.bank", "rb") as bank_input:
                (header, self.__feature, self.__scenarios) = split_bank(bank_input.read())
        except IOError:
            raise BotError("No features bank in {:s}".format(getcwd()))

        if not self.__feature:
            print("No more scenarios to deal")

        mkdir("features")
        with open("features/all.feature", "wb") as features:
            features.write(header)
            features.write(self.__feature)
            if self.__scenarios:
                features.write(self.__scenarios[0])

@@ -1,12 +1,37 @@
+from os.path import join%0A
 from os impo
@@ -47,16 +47,16 @@
  getcwd%0A
-
 from ban
@@ -104,16 +104,156 @@
 tError%0A%0A
+FEATURE_BANK_FILENAME = %22features.bank%22%0AFEATURES_DIRECTORY = %22features%22%0AOUTPUT_FEATURES_FILENAME = join(FEATURES_DIRECTORY, %22all.feature%22)%0A%0A
 class De
@@ -406,31 +406,37 @@
 th open(
-%22features.bank%22
+FEATURE_BANK_FILENAME
 , %22rb%22) 
@@ -731,26 +731,34 @@
   mkdir(
-%22features%22
+FEATURES_DIRECTORY
 )%0A      
@@ -773,30 +773,32 @@
 pen(
-%22features/all.feature%22
+OUTPUT_FEATURES_FILENAME
 , %22w

Replace magic strings with constants