コード例 #1
0
class wxTestCase(TestCase):
    # pylint: disable=W0404
    app = wx.App(0)
    frame = TestCaseFrame()
    from taskcoachlib import i18n
    i18n.Translator('en_US')
    from taskcoachlib import gui
    gui.init()

    def tearDown(self):
        super(wxTestCase, self).tearDown()
        self.frame.DestroyChildren() # Clean up GDI objects on Windows
コード例 #2
0
ファイル: generate_taskfile.py プロジェクト: casics/extractor
Task Coach is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
'''

# Script to generate (big) task files

import sys, random, wx
app = wx.App(False)
sys.path.insert(0, '..')
from taskcoachlib import i18n
i18n.Translator('en_US')
from taskcoachlib import persistence, config
from taskcoachlib.domain import task, category, date, effort
from taskcoachlib.gui import artprovider
import randomtext

def randomThing(thingFactory, default=None):
    return default if random.random() < 0.8 else thingFactory()

def randomDescription():
    return randomThing(lambda: randomtext.text(times=random.randint(3,10)), default='')

def randomSubject():
    return randomtext.title()

def randomColor():
コード例 #3
0
ファイル: application.py プロジェクト: casics/extractor
 def __init_language(self):
     ''' Initialize the current translation. '''
     from taskcoachlib import i18n
     i18n.Translator(self.determine_language(self._options, self.settings))