1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00
PySolFC/tests/lib/pysol_tests/common_mocks.py
Juhani Numminen 076ee8d11a Run unittests via a single TAP test
Enable standard unittest discovery by creating __init__.py files
and renaming test modules to test*.py.
2021-07-07 18:13:34 +03:00

62 lines
1.1 KiB
Python

#! /usr/bin/env python MockItem
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2018 Shlomi Fish <shlomif@cpan.org>
#
# Distributed under terms of the MIT license.
import pysollib.stack
from pysollib.acard import AbstractCard
"""
"""
class MockItem:
def __init__(self):
pass
def tkraise(self):
return
def addtag(self, nouse):
return
class MockCanvas:
def __init__(self):
self.xmargin = self.ymargin = 50
class MockImages:
def __init__(self):
self.CARDW = self.CARDH = self.CARD_YOFFSET = 50
class MockOpt:
def __init__(self):
self.randomize_place = False
class MockApp:
def __init__(self):
self.images = MockImages()
self.opt = MockOpt()
class MockTalon:
def __init__(self, g):
self.cards = [
AbstractCard(1000+r*100+s*10, 0, s, r, g)
for s in range(4) for r in range(13)]
for c in self.cards:
c.item = MockItem()
def _empty_override(*args):
return True
pysollib.stack.MfxCanvasGroup = _empty_override