Tests (#1086)
* First step in more tests (cherry picked from commit b9af117) * Formatting (cherry picked from commit 5f037e6) * Booster test fixes * Switch to wx3.0 * try coda * Test output * Tweak travis * try reduced virtualenv * Tweak travis * Reduce test to a single one. * Formatting
This commit is contained in:
36
tests/test_modules/test_eos/test_saveddata/test_booster.py
Normal file
36
tests/test_modules/test_eos/test_saveddata/test_booster.py
Normal file
@@ -0,0 +1,36 @@
|
||||
# Add root folder to python paths
|
||||
# This must be done on every test in order to pass in Travis
|
||||
import os
|
||||
import sys
|
||||
|
||||
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
sys.path.append(os.path.realpath(os.path.join(script_dir, '..', '..', '..', '..')))
|
||||
|
||||
# noinspection PyPackageRequirements
|
||||
from _development.helpers import DBInMemory as DB, Gamedata, Saveddata
|
||||
from _development.helpers_fits import RifterFit, KeepstarFit
|
||||
from _development.helpers_items import StrongBluePillBooster
|
||||
|
||||
|
||||
def test_itemModifiedAttributes(DB, StrongBluePillBooster):
|
||||
assert StrongBluePillBooster.itemModifiedAttributes is not None
|
||||
|
||||
|
||||
def test_isInvalid(DB, StrongBluePillBooster):
|
||||
assert StrongBluePillBooster.isInvalid is False
|
||||
|
||||
|
||||
def test_slot(DB, StrongBluePillBooster):
|
||||
assert StrongBluePillBooster.slot == 1
|
||||
|
||||
|
||||
def test_item(DB, Gamedata, StrongBluePillBooster):
|
||||
assert isinstance(StrongBluePillBooster.item, Gamedata['Item'])
|
||||
|
||||
|
||||
def test_clear(DB, StrongBluePillBooster):
|
||||
try:
|
||||
StrongBluePillBooster.clear()
|
||||
assert True
|
||||
except:
|
||||
assert False
|
||||
Reference in New Issue
Block a user