Skip to content

Commit

Permalink
Cambios en nombres de modulos
Browse files Browse the repository at this point in the history
  • Loading branch information
Amedio committed Oct 17, 2011
1 parent 51e210e commit 6d091f4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
9 changes: 7 additions & 2 deletions amedio/src/main/Calculator.py
@@ -1,3 +1,5 @@
from src.main.constants import _constants

class Calculator(object):

def __init__(self):
Expand All @@ -8,8 +10,11 @@ def add(self, addParams):
result = 0

if addParams != "":
if ',' in addParams:
params = addParams.split(',')

const = _constants()

if const.COMMA_SEP() in addParams:
params = addParams.split(const.COMMA_SEP())
result = int(params[0]) + int(params[1])
else:
result = int(addParams)
Expand Down
7 changes: 7 additions & 0 deletions amedio/src/main/constants.py
@@ -0,0 +1,7 @@
class _constants(object):

def __init__(self):
pass

def COMMA_SEP(self):
return ','
2 changes: 1 addition & 1 deletion amedio/src/test/CalculatorTest.py
@@ -1,5 +1,5 @@
import unittest
from src.main.Calculator import Calculator
from src.main.calculator import Calculator


class CalculatorTest(unittest.TestCase):
Expand Down

0 comments on commit 6d091f4

Please sign in to comment.