# Path: magnate/savegame/base_types.py
# def type_name(value):
# def _generic_types_validator(type_enum, value):
# def load_base_types(datadir):
# def init_base_types(datadir):
# DATA_TYPES_SCHEMA = v.Schema({'version': '0.1',
#                               'types': {type_name: [str]}, },
#                              required=True)
# 
# Path: magnate/savegame/db.py
# class PricedItem:
#     class SystemData(Base):  # pylint: disable=unused-variable
#     class CelestialData(Base):  # pylint: disable=unused-variable
#     class LocationData(Base):  # pylint: disable=unused-variable
#     class Commodity(Base):  # pylint: disable=unused-variable
#     class CommodityData(PricedItem, Base):  # pylint: disable=unused-variable
#     class CommodityCategory(Base):  # pylint: disable=unused-variable
#     class Ship(Base):  # pylint: disable=unused-variable
#     class ShipData(PricedItem, Base):  # pylint: disable=unused-variable
#     class Cargo(Base):  # pylint: disable=unused-variable
#     class Property(Base):  # pylint: disable=unused-variable
#     class PropertyData(PricedItem, Base):  # pylint: disable=unused-variable
#     class ShipPart(Base):  # pylint: disable=unused-variable
#     class ShipPartData(PricedItem, Base):  # pylint: disable=unused-variable
#     class EventData(Base):  # pylint: disable=unused-variable
#     class EventCondition(Base):  # pylint: disable=unused-variable
#     class ConditionCategory(Base):  # pylint: disable=unused-variable
#     class Player(Base):  # pylint: disable=unused-variable
#     class World(Base):  # pylint: disable=unused-variable
# SCHEMA_NAMES = ('SystemData', 'CelestialData', 'LocationData', 'Commodity', 'CommodityData',
#                 'CommodityCategory', 'Ship', 'ShipData', 'Cargo', 'Property', 'PropertyData',
#                 'ShipPart', 'ShipPartData', 'EventData', 'EventCondition', 'ConditionCategory',
#                 'Player', 'World',)
# def init_schema(datadir):
# def _init_systems(session, systems):
# def _init_ships(session, ships):
# def _init_property(session, properties):
# def _init_parts(session, ship_parts):
# def _init_events(session, events):
# def init_savegame(engine, game_data):
# def create_savegame(savegame, datadir):
# def load_savegame(savegame, datadir):
# 
# Path: magnate/savegame/data_def.py
# BASE_SCHEMA = None
# SYSTEM_SCHEMA = None
#     SYSTEM_SCHEMA = v.Schema(v.All(system_structure,
#                                    known_celestial))
#     BASE_SCHEMA = v.Schema(v.All(base_structure,
#                                  volume_or_storage))
# def known_celestial(data):
# def volume_or_storage(data):
# def _define_schemas(datadir):
# def load_data_definitions(datadir):


import os.path
import pytest
from magnate.savegame import base_types, db, data_def




@pytest.fixture
def clean_context():
    old_engine = db.engine
    db.engine = None

    old_types = {}

# Path: magnate/savegame/base_types.py
# def type_name(value):
# def _generic_types_validator(type_enum, value):
# def load_base_types(datadir):
# def init_base_types(datadir):
# DATA_TYPES_SCHEMA = v.Schema({'version': '0.1',
#                               'types': {type_name: [str]}, },
#                              required=True)
# 
# Path: magnate/savegame/db.py
# class PricedItem:
#     class SystemData(Base):  # pylint: disable=unused-variable
#     class CelestialData(Base):  # pylint: disable=unused-variable
#     class LocationData(Base):  # pylint: disable=unused-variable
#     class Commodity(Base):  # pylint: disable=unused-variable
#     class CommodityData(PricedItem, Base):  # pylint: disable=unused-variable
#     class CommodityCategory(Base):  # pylint: disable=unused-variable
#     class Ship(Base):  # pylint: disable=unused-variable
#     class ShipData(PricedItem, Base):  # pylint: disable=unused-variable
#     class Cargo(Base):  # pylint: disable=unused-variable
#     class Property(Base):  # pylint: disable=unused-variable
#     class PropertyData(PricedItem, Base):  # pylint: disable=unused-variable
#     class ShipPart(Base):  # pylint: disable=unused-variable
#     class ShipPartData(PricedItem, Base):  # pylint: disable=unused-variable
#     class EventData(Base):  # pylint: disable=unused-variable
#     class EventCondition(Base):  # pylint: disable=unused-variable
#     class ConditionCategory(Base):  # pylint: disable=unused-variable
#     class Player(Base):  # pylint: disable=unused-variable
#     class World(Base):  # pylint: disable=unused-variable
# SCHEMA_NAMES = ('SystemData', 'CelestialData', 'LocationData', 'Commodity', 'CommodityData',
#                 'CommodityCategory', 'Ship', 'ShipData', 'Cargo', 'Property', 'PropertyData',
#                 'ShipPart', 'ShipPartData', 'EventData', 'EventCondition', 'ConditionCategory',
#                 'Player', 'World',)
# def init_schema(datadir):
# def _init_systems(session, systems):
# def _init_ships(session, ships):
# def _init_property(session, properties):
# def _init_parts(session, ship_parts):
# def _init_events(session, events):
# def init_savegame(engine, game_data):
# def create_savegame(savegame, datadir):
# def load_savegame(savegame, datadir):
# 
# Path: magnate/savegame/data_def.py
# BASE_SCHEMA = None
# SYSTEM_SCHEMA = None
#     SYSTEM_SCHEMA = v.Schema(v.All(system_structure,
#                                    known_celestial))
#     BASE_SCHEMA = v.Schema(v.All(base_structure,
#                                  volume_or_storage))
# def known_celestial(data):
# def volume_or_storage(data):
# def _define_schemas(datadir):
# def load_data_definitions(datadir):


# Path: tests/conftest.py
import os.path
import pytest
from magnate.savegame import base_types, db, data_def





@pytest.fixture
def clean_context():
    old_engine = db.engine
    db.engine = None

    old_types = {}

    for key, value in base_types.__dict__.items():