diff --git a/tests/test_modules/test_eos/test_modifiedAttributeDict.py b/tests/test_modules/test_eos/test_modifiedAttributeDict.py index d51f3459a..c98aa9d9b 100644 --- a/tests/test_modules/test_eos/test_modifiedAttributeDict.py +++ b/tests/test_modules/test_eos/test_modifiedAttributeDict.py @@ -4,7 +4,9 @@ import math import os import sys script_dir = os.path.dirname(os.path.abspath(__file__)) -sys.path.append(os.path.realpath(os.path.join(script_dir, '..', '..', '..'))) +script_dir = os.path.realpath(os.path.join(script_dir, '..', '..', '..')) +print script_dir +sys.path.append(script_dir) # noinspection PyPackageRequirements from _development.helpers import DBInMemory as DB, Gamedata, Saveddata @@ -22,22 +24,25 @@ def test_multiply_stacking_penalties(DB, Saveddata, RifterFit): mod = Saveddata['Module'](DB['db'].getItem("EM Ward Amplifier II")) item_modifer = mod.item.getAttribute("emDamageResistanceBonus") + RifterFit.calculateModifiedAttributes() for _ in range(10): - # See: http://wiki.eveuniversity.org/Eve_Math#Stacking_Penalties - current_effectiveness = pow(0.5, (pow(0.45 * (_ - 1), 2))) - - RifterFit.clear() - RifterFit.calculateModifiedAttributes() - if _ == 0: # First run we have no modules, se don't try and calculate them. calculated_resist = RifterFit.ship.getModifiedItemAttr("shieldEmDamageResonance") else: + # Calculate what our next resist should be + # See: http://wiki.eveuniversity.org/Eve_Math#Stacking_Penalties + current_effectiveness = pow(0.5, (pow(0.45 * (_ - 1), 2))) new_item_modifier = 1 + ((item_modifer * current_effectiveness) / 100) calculated_resist = (em_resist * new_item_modifier) + + # Add another resist module to our fit. RifterFit.modules.append(mod) - RifterFit.calculateModifiedAttributes() + + # Modify our fit so that Eos generates new numbers for us. + RifterFit.clear() + RifterFit.calculateModifiedAttributes() em_resist = RifterFit.ship.getModifiedItemAttr("shieldEmDamageResonance") diff --git a/tests/test_modules/test_gui/test_aboutData.py b/tests/test_modules/test_gui/test_aboutData.py index bbb296686..b17668e68 100644 --- a/tests/test_modules/test_gui/test_aboutData.py +++ b/tests/test_modules/test_gui/test_aboutData.py @@ -5,9 +5,9 @@ import sys script_dir = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.realpath(os.path.join(script_dir, '..', '..', '..'))) - from gui.aboutData import versionString, licenses, developers, credits, description + def test_aboutData(): """ Simple test to validate all about data exists