This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from totest import function | |
import logging | |
import click_log | |
def test_function(caplog): | |
click_log.basic_config('test').setLevel(logging.DEBUG) | |
caplog.set_level(logging.WARNING) | |
assert 1 == function() | |
assert caplog.records == 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# coding: utf-8 | |
# Copyright (C) 2013 Patrick Totzke <[email protected]> | |
# This file is released under the GNU GPL, version 3 or a later revision. | |
# | |
# adapted from example1.py and example3.collapse.py from the urwidtrees examples | |
from urwidtrees.tree import SimpleTree # noqa | |
from urwidtrees.decoration import CollapseIconMixin, DecoratedTree, CollapsibleIndentedTree, CollapsibleArrowTree # noqa | |
from urwidtrees.nested import NestedTree # noqa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# coding: utf-8 | |
# Copyright (C) 2013 Patrick Totzke <[email protected]> | |
# This file is released under the GNU GPL, version 3 or a later revision. | |
# | |
# adapted from example1.py and example3.collapse.py from the urwidtrees examples | |
from urwidtrees.tree import SimpleTree | |
from urwidtrees.decoration import CollapseIconMixin, DecoratedTree | |
from urwidtrees.nested import NestedTree |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Copyright (C) 2013 Patrick Totzke <[email protected]> | |
# This file is released under the GNU GPL, version 3 or a later revision. | |
# | |
# adapted from example1.py and example3.collapse.py from the urwidtrees examples | |
from urwidtrees.tree import SimpleTree | |
from urwidtrees.decoration import CollapseIconMixin, DecoratedTree | |
from urwidtrees.widgets import TreeBox | |
import urwid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import string | |
import urwid | |
def genaret_random_text(): | |
choice = string.ascii_uppercase + string.digits | |
return ''.join([random.choice(choice) for _ in range(36)]) | |
class SelectableText(urwid.Text): | |
def selectable(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that "cgeier.id" is my Blockstack ID. https://onename.com/cgeier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[calendars] | |
[[home]] | |
path = ~/.local/share/khal/calendars_test/home/ | |
color = dark green | |
[[work]] | |
path = ~/.local/share/khal/calendars_test/work/ | |
color = dark blue | |
[[events]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import khal | |
from khal.settings import get_config | |
from khal.cli import build_collection | |
from khal.controllers import new_from_string | |
from datetime import date, timedelta | |
today = date.today() | |
config = get_config('test.conf') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urwid | |
class SelectableText(urwid.Text): | |
def selectable(self): | |
return True | |
def keypress(self, size, key): | |
return key | |
content = urwid.SimpleListWalker([ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import date as date | |
import urwid | |
from calendarwidget import CalendarWidget | |
PALETTE = [ | |
('header', 'white', 'black'), | |
('footer', 'white', 'black'), | |
('line header', 'black', 'white', 'bold'), | |
('bright', 'dark blue', 'white', ('bold', 'standout')), |
NewerOlder