SYMBOL INDEX (925 symbols across 65 files) FILE: docs/test/test_docs.py function absjoin (line 4) | def absjoin(*args): FILE: docs/test/test_documentation_sources_exist.py function relative_module_path (line 15) | def relative_module_path(absolute_path): function module_name_and_doc (line 24) | def module_name_and_doc(relative_path): function add_module (line 45) | def add_module(absolute_path): function test_module_has_a_documentation_file (line 73) | def test_module_has_a_documentation_file(module): function test_documentation_references_module (line 78) | def test_documentation_references_module(module): function test_documentation_has_proper_title (line 84) | def test_documentation_has_proper_title(module): function create_new_module_documentation (line 90) | def create_new_module_documentation(): FILE: docs/test/test_sphinx_build.py function print_bytes (line 21) | def print_bytes(bytes_): function sphinx_build (line 30) | def sphinx_build(): function coverage (line 47) | def coverage(sphinx_build): function warnings (line 55) | def warnings(sphinx_build): function test_all_methods_are_documented (line 60) | def test_all_methods_are_documented(coverage): function test_doc_build_passes_without_warnings (line 66) | def test_doc_build_passes_without_warnings(warnings): FILE: knittingpattern/Dumper/FileWrapper.py class BytesWrapper (line 7) | class BytesWrapper(object): method __init__ (line 12) | def __init__(self, text_file, encoding): method write (line 24) | def write(self, bytes_): class TextWrapper (line 30) | class TextWrapper(object): method __init__ (line 35) | def __init__(self, binary_file, encoding): method write (line 47) | def write(self, string): FILE: knittingpattern/Dumper/file.py class ContentDumper (line 7) | class ContentDumper(object): method __init__ (line 24) | def __init__(self, on_dump, text_is_expected=True, encoding="UTF-8"): method encoding (line 51) | def encoding(self): method string (line 56) | def string(self): method _string (line 63) | def _string(self): method bytes (line 70) | def bytes(self): method _bytes (line 77) | def _bytes(self): method file (line 84) | def file(self, file=None): method _file (line 102) | def _file(self, file): method binary_file (line 109) | def binary_file(self, file=None): method _binary_file (line 116) | def _binary_file(self, file): method _mode_and_encoding_for_open (line 123) | def _mode_and_encoding_for_open(self): method path (line 129) | def path(self, path): method _path (line 136) | def _path(self, path): method _temporary_file (line 142) | def _temporary_file(self, delete): method temporary_path (line 149) | def temporary_path(self, extension=""): method temporary_file (line 165) | def temporary_file(self, delete_when_closed=True): method binary_temporary_file (line 186) | def binary_temporary_file(self, delete_when_closed=True): method _binary_temporary_file (line 191) | def _binary_temporary_file(self, delete): method __repr__ (line 197) | def __repr__(self): FILE: knittingpattern/Dumper/json.py class JSONDumper (line 6) | class JSONDumper(ContentDumper): method __init__ (line 10) | def __init__(self, on_dump): method object (line 18) | def object(self): method _dump_to_file (line 22) | def _dump_to_file(self, file): method knitting_pattern (line 26) | def knitting_pattern(self, specification=None): FILE: knittingpattern/Dumper/svg.py class SVGDumper (line 6) | class SVGDumper(XMLDumper): method kivy_svg (line 10) | def kivy_svg(self): FILE: knittingpattern/Dumper/xml.py class XMLDumper (line 6) | class XMLDumper(ContentDumper): method __init__ (line 10) | def __init__(self, on_dump): method object (line 18) | def object(self): method _dump_to_file (line 22) | def _dump_to_file(self, file): FILE: knittingpattern/IdCollection.py class IdCollection (line 6) | class IdCollection(object): method __init__ (line 9) | def __init__(self): method append (line 16) | def append(self, item): method at (line 23) | def at(self, index): method __getitem__ (line 33) | def __getitem__(self, id_): method __bool__ (line 50) | def __bool__(self): method __iter__ (line 56) | def __iter__(self): method __len__ (line 64) | def __len__(self): method first (line 69) | def first(self): FILE: knittingpattern/Instruction.py class Instruction (line 59) | class Instruction(Prototype): method id (line 78) | def id(self): method type (line 87) | def type(self): method color (line 103) | def color(self): method colors (line 112) | def colors(self): method description (line 122) | def description(self): method number_of_consumed_meshes (line 131) | def number_of_consumed_meshes(self): method number_of_produced_meshes (line 142) | def number_of_produced_meshes(self): method has_color (line 152) | def has_color(self): method does_knit (line 160) | def does_knit(self): method does_purl (line 168) | def does_purl(self): method produces_meshes (line 176) | def produces_meshes(self): method consumes_meshes (line 186) | def consumes_meshes(self): method render_z (line 197) | def render_z(self): method hex_color (line 207) | def hex_color(self): method to_svg (line 217) | def to_svg(self, converter=None): class InstructionInRow (line 234) | class InstructionInRow(Instruction): method __init__ (line 241) | def __init__(self, row, spec): method transfer_to_row (line 260) | def transfer_to_row(self, new_row): method _new_produced_mesh (line 273) | def _new_produced_mesh(self): method _new_consumed_mesh (line 278) | def _new_consumed_mesh(self): method row (line 283) | def row(self): method is_in_row (line 291) | def is_in_row(self): method get_index_in_row (line 301) | def get_index_in_row(self): method index_in_row (line 324) | def index_in_row(self): method row_instructions (line 346) | def row_instructions(self): method next_instruction_in_row (line 356) | def next_instruction_in_row(self): method previous_instruction_in_row (line 373) | def previous_instruction_in_row(self): method _instruction_not_found_message (line 390) | def _instruction_not_found_message(self): method _raise_not_found_error (line 402) | def _raise_not_found_error(self): method index_of_first_produced_mesh_in_row (line 413) | def index_of_first_produced_mesh_in_row(self): method index_of_last_produced_mesh_in_row (line 441) | def index_of_last_produced_mesh_in_row(self): method index_of_first_consumed_mesh_in_row (line 459) | def index_of_first_consumed_mesh_in_row(self): method index_of_last_consumed_mesh_in_row (line 475) | def index_of_last_consumed_mesh_in_row(self): method produced_meshes (line 485) | def produced_meshes(self): method consumed_meshes (line 502) | def consumed_meshes(self): method __repr__ (line 518) | def __repr__(self): method producing_instructions (line 537) | def producing_instructions(self): method consuming_instructions (line 550) | def consuming_instructions(self): method color (line 563) | def color(self): method last_produced_mesh (line 575) | def last_produced_mesh(self): method last_consumed_mesh (line 587) | def last_consumed_mesh(self): method first_produced_mesh (line 599) | def first_produced_mesh(self): method first_consumed_mesh (line 611) | def first_consumed_mesh(self): class InstructionNotFoundInRow (line 623) | class InstructionNotFoundInRow(ValueError): FILE: knittingpattern/InstructionLibrary.py class InstructionLibrary (line 13) | class InstructionLibrary(object): method _loader_class (line 21) | def _loader_class(self): method _instruction_class (line 28) | def _instruction_class(self): method __init__ (line 33) | def __init__(self): method load (line 43) | def load(self): method _process_loaded_object (line 64) | def _process_loaded_object(self, obj): method add_instruction (line 71) | def add_instruction(self, specification): method as_instruction (line 82) | def as_instruction(self, specification): method __getitem__ (line 98) | def __getitem__(self, instruction_type): method loaded_types (line 106) | def loaded_types(self): class DefaultInstructions (line 115) | class DefaultInstructions(InstructionLibrary): method __init__ (line 122) | def __init__(self): function default_instructions (line 131) | def default_instructions(): FILE: knittingpattern/KnittingPattern.py class KnittingPattern (line 13) | class KnittingPattern(object): method __init__ (line 21) | def __init__(self, id_, name, rows, parser): method id (line 38) | def id(self): method name (line 45) | def name(self): method rows (line 50) | def rows(self): method add_row (line 58) | def add_row(self, id_): method rows_in_knit_order (line 67) | def rows_in_knit_order(self): method instruction_colors (line 78) | def instruction_colors(self): FILE: knittingpattern/KnittingPatternSet.py class KnittingPatternSet (line 11) | class KnittingPatternSet(object): method __init__ (line 23) | def __init__(self, type_, version, patterns, parser, comment=None): method version (line 47) | def version(self): method type (line 58) | def type(self): method patterns (line 69) | def patterns(self): method comment (line 80) | def comment(self): method to_ayabpng (line 88) | def to_ayabpng(self): method to_svg (line 105) | def to_svg(self, zoom): method add_new_pattern (line 133) | def add_new_pattern(self, id_, name=None): method first (line 149) | def first(self): FILE: knittingpattern/Loader.py function identity (line 11) | def identity(object_): function true (line 17) | def true(_): class PathLoader (line 23) | class PathLoader(object): method __init__ (line 30) | def __init__(self, process=identity, chooses_path=true): method folder (line 45) | def folder(self, folder): method chooses_path (line 64) | def chooses_path(self, path): method path (line 72) | def path(self, path): method _relative_to_absolute (line 80) | def _relative_to_absolute(self, module_location, folder): method relative_folder (line 100) | def relative_folder(self, module, folder): method relative_file (line 122) | def relative_file(self, module, file): method choose_paths (line 138) | def choose_paths(self, paths): method example (line 144) | def example(self, relative_path): method examples (line 156) | def examples(self): class ContentLoader (line 168) | class ContentLoader(PathLoader): method string (line 175) | def string(self, string): method file (line 181) | def file(self, file): method path (line 190) | def path(self, path): method url (line 198) | def url(self, url, encoding="UTF-8"): class JSONLoader (line 214) | class JSONLoader(ContentLoader): method object (line 221) | def object(self, object_): method string (line 229) | def string(self, string): FILE: knittingpattern/Mesh.py class Mesh (line 5) | class Mesh(metaclass=ABCMeta): method _producing_instruction_and_index (line 20) | def _producing_instruction_and_index(self): method _producing_row_and_index (line 24) | def _producing_row_and_index(self): method _consuming_instruction_and_index (line 28) | def _consuming_instruction_and_index(self): method _consuming_row_and_index (line 32) | def _consuming_row_and_index(self): method _is_produced (line 36) | def _is_produced(self): method _is_consumed (line 40) | def _is_consumed(self): method _is_consumed_mesh (line 44) | def _is_consumed_mesh(self): method _disconnect (line 51) | def _disconnect(self): method _connect_to (line 55) | def _connect_to(self, other_mesh): method _as_produced_mesh (line 59) | def _as_produced_mesh(self): method _as_consumed_mesh (line 63) | def _as_consumed_mesh(self): method _is_connected_to (line 67) | def _is_connected_to(self, other_mesh): method _assert_is_produced (line 70) | def _assert_is_produced(self): method _assert_is_consumed (line 73) | def _assert_is_consumed(self): method is_produced (line 76) | def is_produced(self): method is_consumed (line 92) | def is_consumed(self): method index_in_producing_instruction (line 109) | def index_in_producing_instruction(self): method producing_instruction (line 131) | def producing_instruction(self): method producing_row (line 146) | def producing_row(self): method index_in_producing_row (line 161) | def index_in_producing_row(self): method index_in_consuming_row (line 181) | def index_in_consuming_row(self): method consuming_row (line 202) | def consuming_row(self): method consuming_instruction (line 217) | def consuming_instruction(self): method index_in_consuming_instruction (line 232) | def index_in_consuming_instruction(self): method is_knit (line 253) | def is_knit(self): method __repr__ (line 264) | def __repr__(self): method disconnect (line 296) | def disconnect(self): method connect_to (line 304) | def connect_to(self, other_mesh): method is_connected (line 318) | def is_connected(self): method as_produced_mesh (line 326) | def as_produced_mesh(self): method as_consumed_mesh (line 345) | def as_consumed_mesh(self): method is_mesh (line 350) | def is_mesh(self): method is_connected_to (line 358) | def is_connected_to(self, other_mesh): method can_connect_to (line 363) | def can_connect_to(self, other): class ProducedMesh (line 371) | class ProducedMesh(Mesh): method __init__ (line 375) | def __init__(self, producing_instruction, method _producing_instruction_and_index (line 397) | def _producing_instruction_and_index(self): method _producing_row_and_index (line 400) | def _producing_row_and_index(self): method _consuming_instruction_and_index (line 406) | def _consuming_instruction_and_index(self): method _consuming_row_and_index (line 409) | def _consuming_row_and_index(self): method _is_produced (line 412) | def _is_produced(self): method _is_consumed (line 415) | def _is_consumed(self): method _is_consumed_mesh (line 418) | def _is_consumed_mesh(self): method _disconnect (line 421) | def _disconnect(self): method _connect_to (line 426) | def _connect_to(self, other_mesh): method _as_produced_mesh (line 431) | def _as_produced_mesh(self): method _as_consumed_mesh (line 434) | def _as_consumed_mesh(self): method _is_connected_to (line 438) | def _is_connected_to(self, other_mesh): class ConsumedMesh (line 442) | class ConsumedMesh(Mesh): method __init__ (line 445) | def __init__(self, consuming_instruction, method _producing_instruction_and_index (line 467) | def _producing_instruction_and_index(self): method _producing_row_and_index (line 470) | def _producing_row_and_index(self): method _consuming_instruction_and_index (line 473) | def _consuming_instruction_and_index(self): method _consuming_row_and_index (line 476) | def _consuming_row_and_index(self): method _is_produced (line 483) | def _is_produced(self): method _is_consumed (line 486) | def _is_consumed(self): method _is_consumed_mesh (line 489) | def _is_consumed_mesh(self): method _disconnect (line 492) | def _disconnect(self): method _disconnected (line 496) | def _disconnected(self): method _connect_to (line 499) | def _connect_to(self, other_mesh): method _connect_to_produced_mesh (line 503) | def _connect_to_produced_mesh(self, produced_mesh): method _as_produced_mesh (line 508) | def _as_produced_mesh(self): method _as_consumed_mesh (line 512) | def _as_consumed_mesh(self): method _is_connected_to (line 515) | def _is_connected_to(self, other_mesh): FILE: knittingpattern/Parser.py class ParsingError (line 27) | class ParsingError(ValueError): class Parser (line 36) | class Parser(object): method __init__ (line 40) | def __init__(self, specification): method _start (line 51) | def _start(self): method _to_id (line 61) | def _to_id(id_): method _error (line 68) | def _error(self, text): method knitting_pattern_set (line 76) | def knitting_pattern_set(self, values): method _finish_inheritance (line 92) | def _finish_inheritance(self): method _delay_inheritance (line 99) | def _delay_inheritance(self, prototype, parent_id): method _finish_instructions (line 107) | def _finish_instructions(self): method _delay_instructions (line 114) | def _delay_instructions(self, row): method _new_pattern_collection (line 122) | def _new_pattern_collection(self): method new_row_collection (line 130) | def new_row_collection(self): method _fill_pattern_collection (line 138) | def _fill_pattern_collection(self, pattern_collection, values): method _row (line 145) | def _row(self, values): method new_row (line 155) | def new_row(self, id_): method instruction_in_row (line 164) | def instruction_in_row(self, row, specification): method _pattern (line 174) | def _pattern(self, base): method new_pattern (line 184) | def new_pattern(self, id_, name, rows=None): method _rows (line 194) | def _rows(self, spec): method _connect_rows (line 201) | def _connect_rows(self, connections): method _get_type (line 231) | def _get_type(self, values): method _get_version (line 243) | def _get_version(self, values): method _create_pattern_set (line 247) | def _create_pattern_set(self, pattern, values): function default_parser (line 257) | def default_parser(): FILE: knittingpattern/ParsingSpecification.py class ParsingSpecification (line 36) | class ParsingSpecification(object): method __init__ (line 45) | def __init__(self, class DefaultSpecification (line 69) | class DefaultSpecification(ParsingSpecification): method __init__ (line 77) | def __init__(self): method __repr__ (line 82) | def __repr__(cls): function new_knitting_pattern_set_loader (line 91) | def new_knitting_pattern_set_loader(specification=DefaultSpecification()): FILE: knittingpattern/Prototype.py class Prototype (line 6) | class Prototype(object): method __init__ (line 16) | def __init__(self, specification, inherited_values=()): method get (line 36) | def get(self, key, default=None): method __getitem__ (line 47) | def __getitem__(self, key): method __contains__ (line 61) | def __contains__(self, key): method inherit_from (line 73) | def inherit_from(self, new_specification): FILE: knittingpattern/Row.py class Row (line 20) | class Row(Prototype): method __init__ (line 28) | def __init__(self, row_id, values, parser): method _instructions_changed (line 46) | def _instructions_changed(self, change): method id (line 57) | def id(self): method instructions (line 65) | def instructions(self): method number_of_produced_meshes (line 75) | def number_of_produced_meshes(self): method number_of_consumed_meshes (line 90) | def number_of_consumed_meshes(self): method produced_meshes (line 105) | def produced_meshes(self): method consumed_meshes (line 116) | def consumed_meshes(self): method __repr__ (line 121) | def __repr__(self): method color (line 130) | def color(self): method instruction_colors (line 138) | def instruction_colors(self): method last_produced_mesh (line 148) | def last_produced_mesh(self): method last_consumed_mesh (line 163) | def last_consumed_mesh(self): method first_produced_mesh (line 178) | def first_produced_mesh(self): method first_consumed_mesh (line 193) | def first_consumed_mesh(self): method rows_before (line 208) | def rows_before(self): method rows_after (line 225) | def rows_after(self): method first_instruction (line 242) | def first_instruction(self): method last_instruction (line 251) | def last_instruction(self): FILE: knittingpattern/__init__.py function load_from (line 16) | def load_from(): function load_from_object (line 35) | def load_from_object(object_): function load_from_string (line 43) | def load_from_string(string): function load_from_file (line 51) | def load_from_file(file): function load_from_path (line 59) | def load_from_path(path): function load_from_url (line 67) | def load_from_url(url): function load_from_relative_file (line 75) | def load_from_relative_file(module, path_relative_to): function convert_from_image (line 88) | def convert_from_image(colors=("white", "black")): function new_knitting_pattern (line 107) | def new_knitting_pattern(id_, name=None): function new_knitting_pattern_set (line 123) | def new_knitting_pattern_set(): FILE: knittingpattern/convert/AYABPNGBuilder.py class AYABPNGBuilder (line 12) | class AYABPNGBuilder(object): method __init__ (line 25) | def __init__(self, min_x, min_y, max_x, max_y, method write_to_file (line 51) | def write_to_file(self, file): method _convert_color_to_rrggbb (line 59) | def _convert_color_to_rrggbb(color): method _convert_rrggbb_to_image_color (line 66) | def _convert_rrggbb_to_image_color(self, rrggbb): method _convert_to_image_color (line 70) | def _convert_to_image_color(self, color): method _set_pixel_and_convert_color (line 75) | def _set_pixel_and_convert_color(self, x, y, color): method _set_pixel (line 82) | def _set_pixel(self, x, y, color): method set_pixel (line 95) | def set_pixel(self, x, y, color): method is_in_bounds (line 105) | def is_in_bounds(self, x, y): method set_color_in_grid (line 115) | def set_color_in_grid(self, color_in_grid): method set_colors_in_grid (line 130) | def set_colors_in_grid(self, some_colors_in_grid): method default_color (line 142) | def default_color(self): FILE: knittingpattern/convert/AYABPNGDumper.py class AYABPNGDumper (line 10) | class AYABPNGDumper(ContentDumper): method __init__ (line 13) | def __init__(self, function_that_returns_a_knitting_pattern_set): method _dump_knitting_pattern (line 30) | def _dump_knitting_pattern(self, file): method temporary_path (line 39) | def temporary_path(self, extension=".png"): FILE: knittingpattern/convert/InstructionSVGCache.py class InstructionSVGCache (line 10) | class InstructionSVGCache(object): method __init__ (line 20) | def __init__(self, instruction_to_svg=None): method get_instruction_id (line 36) | def get_instruction_id(self, instruction_or_id): method _new_svg_dumper (line 49) | def _new_svg_dumper(self, on_dump): method to_svg (line 56) | def to_svg(self, instruction_or_id, method instruction_to_svg_dict (line 75) | def instruction_to_svg_dict(self, instruction_or_id, copy_result=True): function default_instruction_svg_cache (line 96) | def default_instruction_svg_cache(): FILE: knittingpattern/convert/InstructionToSVG.py class InstructionToSVG (line 14) | class InstructionToSVG(object): method _loader_class (line 18) | def _loader_class(self): method __init__ (line 23) | def __init__(self): method load (line 28) | def load(self): method _process_loaded_object (line 44) | def _process_loaded_object(self, path): method instruction_to_svg_dict (line 55) | def instruction_to_svg_dict(self, instruction): method instruction_to_svg (line 66) | def instruction_to_svg(self, instruction): method _set_fills_in_color_layer (line 90) | def _set_fills_in_color_layer(self, svg_string, color): method has_svg_for_instruction (line 125) | def has_svg_for_instruction(self, instruction): method default_instruction_to_svg (line 139) | def default_instruction_to_svg(self, instruction): method default_instruction_to_svg_dict (line 155) | def default_instruction_to_svg_dict(self, instruction): function default_instructions_to_svg (line 177) | def default_instructions_to_svg(): FILE: knittingpattern/convert/KnittingPatternToSVG.py class KnittingPatternToSVG (line 10) | class KnittingPatternToSVG(object): method __init__ (line 17) | def __init__(self, knittingpattern, layout, instruction_to_svg, builder, method build_SVG_dict (line 39) | def build_SVG_dict(self): method _register_instruction_in_defs (line 74) | def _register_instruction_in_defs(self, instruction): method _make_definition (line 99) | def _make_definition(self, svg_dict, instruction_id): method _compute_scale (line 118) | def _compute_scale(self, instruction_id, svg_dict): FILE: knittingpattern/convert/Layout.py class InGrid (line 27) | class InGrid(object): method __init__ (line 31) | def __init__(self, position): method x (line 36) | def x(self): method y (line 43) | def y(self): method xy (line 50) | def xy(self): method yx (line 57) | def yx(self): method width (line 64) | def width(self): method height (line 72) | def height(self): method row (line 79) | def row(self): method bounding_box (line 86) | def bounding_box(self): method id (line 95) | def id(self): class InstructionInGrid (line 100) | class InstructionInGrid(InGrid): method __init__ (line 104) | def __init__(self, instruction, position): method _width (line 115) | def _width(self): method instruction (line 125) | def instruction(self): method color (line 134) | def color(self): method _row (line 141) | def _row(self): class RowInGrid (line 146) | class RowInGrid(InGrid): method __init__ (line 149) | def __init__(self, row, position): method _width (line 155) | def _width(self): method instructions (line 160) | def instructions(self): method _bounding_box (line 177) | def _bounding_box(self): method _id (line 186) | def _id(self): function identity (line 190) | def identity(object_): class _RecursiveWalk (line 195) | class _RecursiveWalk(object): method __init__ (line 199) | def __init__(self, first_instruction): method _expand (line 207) | def _expand(self, row, consumed_position, passed): method _step (line 211) | def _step(self, row, position, passed): method _expand_consumed_mesh (line 224) | def _expand_consumed_mesh(self, mesh, mesh_index, row_position, passed): method _expand_produced_mesh (line 235) | def _expand_produced_mesh(self, mesh, mesh_index, row_position, passed): method _row_should_be_placed (line 246) | def _row_should_be_placed(self, row, position): method _place_row (line 251) | def _place_row(self, row, position): method _walk (line 255) | def _walk(self): method instruction_in_grid (line 261) | def instruction_in_grid(self, instruction): method row_in_grid (line 268) | def row_in_grid(self, row): class Connection (line 273) | class Connection(object): method __init__ (line 276) | def __init__(self, start, stop): method start (line 285) | def start(self): method stop (line 292) | def stop(self): method is_visible (line 298) | def is_visible(self): class GridLayout (line 308) | class GridLayout(object): method __init__ (line 311) | def __init__(self, pattern): method walk_instructions (line 322) | def walk_instructions(self, mapping=identity): method walk_rows (line 338) | def walk_rows(self, mapping=identity): method walk_connections (line 348) | def walk_connections(self, mapping=identity): method bounding_box (line 369) | def bounding_box(self): method row_in_grid (line 380) | def row_in_grid(self, row): FILE: knittingpattern/convert/SVGBuilder.py class SVGBuilder (line 25) | class SVGBuilder(object): method __init__ (line 32) | def __init__(self): method bounding_box (line 43) | def bounding_box(self): method bounding_box (line 60) | def bounding_box(self, bbox): method place (line 71) | def place(self, x, y, svg, layer_id): method place_svg_dict (line 85) | def place_svg_dict(self, x, y, svg_dict, layer_id, group=None): method place_svg_use_coords (line 104) | def place_svg_use_coords(self, x, y, symbol_id, layer_id, group=None): method place_svg_use (line 121) | def place_svg_use(self, symbol_id, layer_id, group=None): method _get_layer (line 129) | def _get_layer(self, layer_id): method insert_defs (line 148) | def insert_defs(self, defs): method get_svg_dict (line 166) | def get_svg_dict(self): method write_to_file (line 170) | def write_to_file(self, file): FILE: knittingpattern/convert/color.py function convert_color_to_rrggbb (line 5) | def convert_color_to_rrggbb(color): FILE: knittingpattern/convert/image_to_knittingpattern.py function convert_image_to_knitting_pattern (line 12) | def convert_image_to_knitting_pattern(path, colors=("white", "black")): FILE: knittingpattern/convert/load_and_dump.py function load_and_dump (line 9) | def load_and_dump(create_loader, create_dumper, load_and_dump_): function decorate_load_and_dump (line 43) | def decorate_load_and_dump(create_loader, create_dumper): FILE: knittingpattern/convert/test/test_AYABPNGBuilder.py function builder (line 15) | def builder(): class TestColorConversion (line 19) | class TestColorConversion(object): method convert (line 27) | def convert(self): method test_convert_24_bit (line 30) | def test_convert_24_bit(self, convert): method test_convert_blue (line 33) | def test_convert_blue(self, convert): method test_can_convert_anything_to_color (line 36) | def test_can_convert_anything_to_color(self, convert): class TestBounds (line 40) | class TestBounds(object): method test_inside (line 44) | def test_inside(self, builder, x, y): method test_outside (line 49) | def test_outside(self, builder, x, y): class TestSetPixel (line 53) | class TestSetPixel(object): method set (line 56) | def set(self): method patched (line 60) | def patched(self, builder, set): method test_set_pixel (line 64) | def test_set_pixel(self, patched, set): method test_set_pixel_converts_color (line 68) | def test_set_pixel_converts_color(self, patched, set): method test_set_with_instruction (line 72) | def test_set_with_instruction(self, patched, set): method test_call_many_instructions (line 76) | def test_call_many_instructions(self, patched, set): method test_setiing_color_none_does_nothing (line 86) | def test_setiing_color_none_does_nothing(self, patched, set): class TestSavingAsPNG (line 97) | class TestSavingAsPNG(object): method image_path (line 100) | def image_path(self): method builder (line 104) | def builder(self, image_path): method image (line 118) | def image(self, image_path, builder): method test_pixels_are_set (line 121) | def test_pixels_are_set(self, image): method test_bbox_is_3x3 (line 126) | def test_bbox_is_3x3(self, image): method test_other_pixels_have_default_color (line 129) | def test_other_pixels_have_default_color(self, image): class TestDefaultColor (line 133) | class TestDefaultColor(object): method default_color (line 136) | def default_color(self, builder): method test_can_change_default_color (line 139) | def test_can_change_default_color(self): method test_default_color_is_white (line 143) | def test_default_color_is_white(self, default_color): FILE: knittingpattern/convert/test/test_SVGBuilder.py function file (line 9) | def file(): function builder (line 14) | def builder(): function svg (line 21) | def svg(builder, file): function svg1 (line 32) | def svg1(builder, svg): function row1 (line 44) | def row1(svg1): function row2 (line 49) | def row2(svg1): function instruction1 (line 54) | def instruction1(row1): function instruction2 (line 59) | def instruction2(row1): function instruction3 (line 64) | def instruction3(row1): function instruction21 (line 69) | def instruction21(row2): function instruction22 (line 74) | def instruction22(row2): function instruction23 (line 79) | def instruction23(row2): function test_rendering_nothing_is_a_valid_xml (line 83) | def test_rendering_nothing_is_a_valid_xml(builder, file): function test_rendering_nothing_is_an_svg (line 91) | def test_rendering_nothing_is_an_svg(builder, file): function test_translate_to_right_position (line 99) | def test_translate_to_right_position(instruction1): function test_row_has_id (line 103) | def test_row_has_id(row1): function test_row_is_displayed_correctly_by_inkscape (line 107) | def test_row_is_displayed_correctly_by_inkscape(row1): function test_content_is_in_group (line 112) | def test_content_is_in_group(instruction1): function test_row_contains_several_instructions (line 116) | def test_row_contains_several_instructions(row1, row2): function test_instruction2_is_translated (line 121) | def test_instruction2_is_translated(instruction2): function test_instruction3_is_translated (line 125) | def test_instruction3_is_translated(instruction3): function test_instruction21_is_translated (line 129) | def test_instruction21_is_translated(instruction21): function test_instruction22_is_translated (line 133) | def test_instruction22_is_translated(instruction22): function test_instruction23_is_translated (line 137) | def test_instruction23_is_translated(instruction23): function test_bounding_box (line 141) | def test_bounding_box(builder): function test_viewport_is_bounding_box (line 145) | def test_viewport_is_bounding_box(svg1): function test_width (line 149) | def test_width(svg1): function test_height (line 153) | def test_height(svg1): FILE: knittingpattern/convert/test/test_convert.py function parse_file (line 22) | def parse_file(file): function parse_string (line 30) | def parse_string(string): FILE: knittingpattern/convert/test/test_default_instruction_layout.py function default (line 7) | def default(): function test_knit_has_no_z_index (line 11) | def test_knit_has_no_z_index(default): function test_yo_has_z_index (line 15) | def test_yo_has_z_index(default): FILE: knittingpattern/convert/test/test_default_svgs.py function default (line 12) | def default(): function test_default_instruction_is_not_the_same (line 16) | def test_default_instruction_is_not_the_same(default): function test_instructions_have_svg (line 22) | def test_instructions_have_svg(default, instruction): function test_default_does_not_have_all_instructions (line 26) | def test_default_does_not_have_all_instructions(default): FILE: knittingpattern/convert/test/test_images.py function title (line 13) | def title(content): function is_knit (line 20) | def is_knit(content): function is_purl (line 24) | def is_purl(content): function is_yo (line 28) | def is_yo(content): function is_k2tog (line 32) | def is_k2tog(content): function is_default (line 36) | def is_default(content): function read (line 40) | def read(path): function test_tests_work_on_corresponding_file (line 55) | def test_tests_work_on_corresponding_file(path, test): function test_tests_do_not_work_on_other_files (line 65) | def test_tests_do_not_work_on_other_files(path, test): function test_default_content_has_identifier_in_place (line 69) | def test_default_content_has_identifier_in_place(): FILE: knittingpattern/convert/test/test_instruction_to_svg.py function knit (line 12) | def knit(): function purl (line 17) | def purl(): function yo (line 22) | def yo(): function its (line 27) | def its(): function loaded (line 32) | def loaded(its): function default (line 38) | def default(its): class TestHasSVGForInstruction (line 43) | class TestHasSVGForInstruction(object): method test_load_from_file (line 46) | def test_load_from_file(self, its, knit): method test_nothing_is_loaded (line 50) | def test_nothing_is_loaded(self, its, knit, purl): method test_load_from_directory (line 54) | def test_load_from_directory(self, its, knit, purl): method test_all_images_are_loaded (line 59) | def test_all_images_are_loaded(self, loaded, knit, purl, yo): method test_default_returns_empty_string_if_nothing_is_loaded (line 64) | def test_default_returns_empty_string_if_nothing_is_loaded(self, its, class TestDefaultInstrucionToSVG (line 69) | class TestDefaultInstrucionToSVG(object): method test_instruction_type_is_replaced_in_default (line 72) | def test_instruction_type_is_replaced_in_default(self, default, knit): method test_default_instruction_is_used (line 75) | def test_default_instruction_is_used(self, default, purl): function is_color_layer (line 81) | def is_color_layer(layer): function color_layers (line 87) | def color_layers(svg): function assert_has_one_colored_layer (line 91) | def assert_has_one_colored_layer(svg): function assert_fill_has_color_of (line 95) | def assert_fill_has_color_of(svg, instruction): class TestInstructionToSVG (line 104) | class TestInstructionToSVG(object): method knit_svg (line 107) | def knit_svg(self, loaded, knit): method purl_svg (line 111) | def purl_svg(self, loaded, purl): method test_file_content_is_included (line 114) | def test_file_content_is_included(self, knit_svg): method test_file_content_is_purl (line 117) | def test_file_content_is_purl(self, purl_svg): method test_returned_object_is_svg_with_viewbox (line 120) | def test_returned_object_is_svg_with_viewbox(self, knit_svg): method test_there_is_one_color_layer (line 123) | def test_there_is_one_color_layer(self, knit_svg): method test_purl_has_one_color_layer (line 126) | def test_purl_has_one_color_layer(self, purl_svg): method test_fill_in_colored_layer_is_replaced_by_color (line 129) | def test_fill_in_colored_layer_is_replaced_by_color(self, knit_svg, kn... method test_purl_is_colored (line 132) | def test_purl_is_colored(self, purl_svg, purl): FILE: knittingpattern/convert/test/test_knittingpattern_to_png.py function block4x4 (line 7) | def block4x4(): function path (line 12) | def path(block4x4): function image (line 17) | def image(path): function test_there_is_a_green_line (line 22) | def test_there_is_a_green_line(image, xy): function test_path_ends_with_png (line 26) | def test_path_ends_with_png(path): FILE: knittingpattern/convert/test/test_layout.py function coordinates (line 9) | def coordinates(layout): function sizes (line 14) | def sizes(layout): function instructions (line 19) | def instructions(layout): function row_ids (line 24) | def row_ids(layout): function connections (line 29) | def connections(layout): class BaseTest (line 34) | class BaseTest: method pattern (line 47) | def pattern(self): method grid (line 54) | def grid(self, pattern): method test_coordinates (line 58) | def test_coordinates(self, grid): method test_size (line 65) | def test_size(self, grid): method test_instructions (line 72) | def test_instructions(self, grid, pattern): method test_row_ids (line 80) | def test_row_ids(self, grid): method test_connections (line 84) | def test_connections(self, grid): method test_bounding_box (line 91) | def test_bounding_box(self, grid): class TestBlock4x4 (line 96) | class TestBlock4x4(BaseTest): class TestHole (line 100) | class TestHole(BaseTest): class TestAddAndRemoveMeshes (line 110) | class TestAddAndRemoveMeshes(BaseTest): method i_1 (line 125) | def i_1(self, pattern): method i_2 (line 129) | def i_2(self, pattern): method i_3 (line 133) | def i_3(self, pattern): method i_4 (line 137) | def i_4(self, pattern): method instructions (line 141) | def instructions(self, i_1, i_2, i_3, i_4): method test_all_consume_one_mesh (line 144) | def test_all_consume_one_mesh(self, instructions): method test_all_produce_one_mesh (line 148) | def test_all_produce_one_mesh(self, instructions): method test_i_1_0_is_not_produced (line 154) | def test_i_1_0_is_not_produced(self, i_1): method test_i_1_1_is_not_produced (line 157) | def test_i_1_1_is_not_produced(self, i_1): method test_i_1_2_is_not_produced (line 160) | def test_i_1_2_is_not_produced(self, i_1): method test_i_1_3_is_not_produced (line 163) | def test_i_1_3_is_not_produced(self, i_1): method test_i_1_0_consumed (line 168) | def test_i_1_0_consumed(self, i_1, i_2): method test_i_1_1_consumed (line 171) | def test_i_1_1_consumed(self, i_1, i_2): method test_i_1_2_consumed (line 174) | def test_i_1_2_consumed(self, i_1, i_2): method test_i_1_3_consumed (line 177) | def test_i_1_3_consumed(self, i_1, i_2): method test_i_2_0_produced (line 182) | def test_i_2_0_produced(self, i_1, i_2): method test_i_2_1_produced (line 185) | def test_i_2_1_produced(self, i_1, i_2): method test_i_2_2_produced (line 188) | def test_i_2_2_produced(self, i_1, i_2): method test_i_2_3_produced (line 191) | def test_i_2_3_produced(self, i_1, i_2): method test_i_2_4_produced (line 194) | def test_i_2_4_produced(self, i_2): method test_i_2_0_consumed (line 199) | def test_i_2_0_consumed(self, i_2, i_3): method test_i_2_1_consumed (line 202) | def test_i_2_1_consumed(self, i_2, i_3): method test_i_2_2_consumed (line 205) | def test_i_2_2_consumed(self, i_2, i_3): method test_i_2_3_not_consumed (line 208) | def test_i_2_3_not_consumed(self, i_2): method test_i_2_4_not_consumed (line 211) | def test_i_2_4_not_consumed(self, i_2): method test_i_3_0_produced (line 216) | def test_i_3_0_produced(self, i_2, i_3): method test_i_3_1_produced (line 219) | def test_i_3_1_produced(self, i_2, i_3): method test_i_3_2_produced (line 222) | def test_i_3_2_produced(self, i_2, i_3): method test_i_3_0_consumed (line 227) | def test_i_3_0_consumed(self, i_3, i_4): method test_i_3_1_consumed (line 230) | def test_i_3_1_consumed(self, i_3, i_4): method test_i_3_2_consumed (line 233) | def test_i_3_2_consumed(self, i_3, i_4): method test_i_4_0_not_produced (line 238) | def test_i_4_0_not_produced(self, i_4): method test_i_4_1_produced (line 241) | def test_i_4_1_produced(self, i_3, i_4): method test_i_4_2_produced (line 244) | def test_i_4_2_produced(self, i_3, i_4): method test_i_4_3_produced (line 247) | def test_i_4_3_produced(self, i_3, i_4): method test_i_4_4_not_produced (line 250) | def test_i_4_4_not_produced(self, i_4): method test_i_4_0_not_consumed (line 255) | def test_i_4_0_not_consumed(self, i_4): method test_i_4_1_not_consumed (line 258) | def test_i_4_1_not_consumed(self, i_4): method test_i_4_2_not_consumed (line 261) | def test_i_4_2_not_consumed(self, i_4): method test_i_4_3_not_consumed (line 264) | def test_i_4_3_not_consumed(self, i_4): method test_i_4_4_not_consumed (line 267) | def test_i_4_4_not_consumed(self, i_4): class TestParallelRows (line 271) | class TestParallelRows(BaseTest): method row_4 (line 289) | def row_4(self, pattern): method skp (line 293) | def skp(self, row_4): method test_skp_has_2_consumed_meshes (line 296) | def test_skp_has_2_consumed_meshes(self, skp): method test_row_4_1_consumes_5_meshes (line 301) | def test_row_4_1_consumes_5_meshes(self, row_4): function test_get_color_from_instruction_in_grid (line 309) | def test_get_color_from_instruction_in_grid(): class TestSmallCafe (line 316) | class TestSmallCafe(BaseTest): class TestCastOffAndBindOn (line 342) | class TestCastOffAndBindOn(BaseTest): method cast_on (line 352) | def cast_on(self, co_row): method co_row (line 356) | def co_row(self, pattern): method co_row_in_grid (line 360) | def co_row_in_grid(self, grid, co_row): method test_cast_on_has_layout_specific_width (line 363) | def test_cast_on_has_layout_specific_width(self, cast_on): method test_first_row_has_width_4 (line 367) | def test_first_row_has_width_4(self, co_row_in_grid): FILE: knittingpattern/convert/test/test_png_to_knittingpattern.py function patterns (line 12) | def patterns(image_path, convert): function pattern (line 18) | def pattern(patterns): function image (line 23) | def image(image_path): function pytest_generate_tests (line 27) | def pytest_generate_tests(metafunc): function test_convert_image_to_knittingpattern (line 38) | def test_convert_image_to_knittingpattern(patterns, image_path): function test_row_length_is_image_length (line 42) | def test_row_length_is_image_length(pattern, image): function test_first_color_is_white (line 47) | def test_first_color_is_white(pattern): function test_other_color_is_white (line 51) | def test_other_color_is_white(pattern): function test_black_exists (line 55) | def test_black_exists(pattern): function test_order_of_conversion (line 59) | def test_order_of_conversion(): FILE: knittingpattern/convert/test/test_save_as_svg.py function is_close_to (line 14) | def is_close_to(v1, v2, relative_epsilon=0.01): function patterns_svg (line 19) | def patterns_svg(): function path (line 24) | def path(patterns_svg): function svg (line 29) | def svg(path): function rows (line 34) | def rows(svg): function instructions (line 39) | def instructions(rows): function rows_test (line 43) | def rows_test(function): function instructions_test (line 50) | def instructions_test(function): function instructions_svg_test (line 57) | def instructions_svg_test(function): function test_svg_contains_four_rows (line 64) | def test_svg_contains_four_rows(svg): function test_rows_contain_four_instructions (line 69) | def test_rows_contain_four_instructions(row_id, row): function test_rows_are_labeled_for_inkscape (line 74) | def test_rows_are_labeled_for_inkscape(row_id, row): function test_row_is_inkscape_layer (line 79) | def test_row_is_inkscape_layer(row_id, row): function test_rows_have_class_for_styling (line 84) | def test_rows_have_class_for_styling(row_id, row): function test_rows_have_id_for_styling (line 89) | def test_rows_have_id_for_styling(row_id, row): function test_instructions_have_class (line 94) | def test_instructions_have_class(instruction): function test_instructions_have_id (line 99) | def test_instructions_have_id(instruction): function test_instructions_content_is_knit_svg_file (line 105) | def test_instructions_content_is_knit_svg_file(instruction): function test_instructions_have_transform (line 110) | def test_instructions_have_transform(instruction, svg, path, patterns_svg): FILE: knittingpattern/test/test_add_and_remove_instructions.py function single_instruction_pattern_set (line 8) | def single_instruction_pattern_set(): function pattern (line 14) | def pattern(single_instruction_pattern_set): function row (line 20) | def row(pattern): function row2 (line 26) | def row2(pattern): function instruction (line 32) | def instruction(row): function instruction2 (line 38) | def instruction2(row2): function empty_row (line 44) | def empty_row(row, instruction): function test_there_is_only_one_instruction (line 51) | def test_there_is_only_one_instruction(row): function test_removing_the_instruction_gives_an_error_when_accessing_its_index (line 59) | def test_removing_the_instruction_gives_an_error_when_accessing_its_index( function test_inserting_a_new_instruction_loads_its_config (line 68) | def test_inserting_a_new_instruction_loads_its_config(row): function test_insert_an_existing_instruction (line 77) | def test_insert_an_existing_instruction(row, instruction2, row2): function test_transfer_removed_instruction (line 84) | def test_transfer_removed_instruction(row, row2): FILE: knittingpattern/test/test_change_row_mapping.py function patterns (line 7) | def patterns(): function line (line 12) | def line(patterns): function row1 (line 17) | def row1(line): function row2 (line 22) | def row2(line): function row3 (line 27) | def row3(line): function mesh11p (line 34) | def mesh11p(row1): function mesh12p (line 39) | def mesh12p(row1): function mesh21p (line 44) | def mesh21p(row2): function mesh31p (line 49) | def mesh31p(row3): function mesh11c (line 56) | def mesh11c(row1): function mesh12c (line 61) | def mesh12c(row1): function mesh21c (line 66) | def mesh21c(row2): function mesh31c (line 71) | def mesh31c(row3): function connected_meshes (line 76) | def connected_meshes(mesh11p, mesh21c, mesh21p, mesh31c): function disconnected_meshes (line 81) | def disconnected_meshes(mesh11c, mesh12c, mesh12p, mesh31p): function meshes (line 86) | def meshes(connected_meshes, disconnected_meshes): function connections (line 91) | def connections(mesh11p, mesh21c, mesh21p, mesh31c): function two_way_connections (line 96) | def two_way_connections(mesh11p, mesh21c, mesh21p, mesh31c): function produced_meshes (line 102) | def produced_meshes(mesh11p, mesh12p, mesh21p, mesh31p): function consumed_meshes (line 107) | def consumed_meshes(mesh11c, mesh12c, mesh21c, mesh31c): function pytest_generate_tests (line 111) | def pytest_generate_tests(metafunc): function connect_meshes (line 118) | def connect_meshes(mesh1, mesh2, connect): function disconnect_meshes (line 124) | def disconnect_meshes(mesh1, mesh2, disconnect): class TestLine (line 129) | class TestLine(object): method test_consumed_meshes_of_row1 (line 133) | def test_consumed_meshes_of_row1(self, row1, mesh11c, mesh12c): method test_produced_meshes_of_row1 (line 139) | def test_produced_meshes_of_row1(self, row1, mesh11p, mesh12p): method test_consumed_mesh_of_row2 (line 146) | def test_consumed_mesh_of_row2(self, row2, mesh21c): method test_produced_mesh_of_row2 (line 151) | def test_produced_mesh_of_row2(self, row2, mesh21p): method test_consumed_mesh_of_row3 (line 156) | def test_consumed_mesh_of_row3(self, row3, mesh31c): method test_produced_mesh_of_row3 (line 161) | def test_produced_mesh_of_row3(self, row3, mesh31p): method test_is_connected (line 166) | def test_is_connected(self, connected_meshes): method test_is_disconnected (line 170) | def test_is_disconnected(self, disconnected_meshes): method test_equality (line 177) | def test_equality(self, connections): method test_is_connected_to (line 182) | def test_is_connected_to(self, two_way_connections): method test_disconnected_from (line 186) | def test_disconnected_from(self, connections, meshes): method test_as_produced_mesh (line 201) | def test_as_produced_mesh(self, produced_meshes): method test_as_consumed_mesh (line 205) | def test_as_consumed_mesh(self, consumed_meshes): function test_remove_a_connection (line 210) | def test_remove_a_connection(row1, row2, mesh11p, mesh21c, disconnect): function test_replace_a_connection (line 227) | def test_replace_a_connection(disconnect, connect, mesh21p, mesh31c, mes... function test_connect_to_a_connected_location (line 248) | def test_connect_to_a_connected_location(mesh12p, mesh31c, mesh21p, conn... function test_connect_to_a_connected_location_with_connected_mesh (line 256) | def test_connect_to_a_connected_location_with_connected_mesh( function test_can_connect (line 264) | def test_can_connect(connected_meshes, consumed_meshes, produced_meshes): function test_create_new_connection (line 272) | def test_create_new_connection(mesh31p, mesh12c, connect, row1, row3): function test_disconnect_disconnected (line 285) | def test_disconnect_disconnected(mesh12c): FILE: knittingpattern/test/test_default_instructions.py function default (line 21) | def default(): function test_mesh_consumption (line 26) | def test_mesh_consumption(default, type_, value): function test_mesh_production (line 31) | def test_mesh_production(default, type_, value): function test_description_present (line 36) | def test_description_present(default, type_): function test_all_default_instructions_are_tested (line 42) | def test_all_default_instructions_are_tested(default): function test_default_instructions_is_a_singleton (line 48) | def test_default_instructions_is_a_singleton(): function test_default_instructions_are_an_instance_of_the_class (line 52) | def test_default_instructions_are_an_instance_of_the_class(): FILE: knittingpattern/test/test_dump_json.py function obj (line 9) | def obj(): function dumper (line 14) | def dumper(obj): function parser (line 21) | def parser(): function test_dump_object (line 25) | def test_dump_object(dumper, obj): function test_dump_string (line 29) | def test_dump_string(dumper, obj): function test_dump_to_temporary_file (line 33) | def test_dump_to_temporary_file(dumper, obj): function test_dump_to_knitting_pattern (line 40) | def test_dump_to_knitting_pattern(dumper, parser, obj): function test_string_representation (line 47) | def test_string_representation(dumper): FILE: knittingpattern/test/test_dumper.py function unicode (line 12) | def unicode(): function binary (line 20) | def binary(): function no_encode_text (line 28) | def no_encode_text(): function no_encode_binary (line 33) | def no_encode_binary(): function pytest_generate_tests (line 39) | def pytest_generate_tests(metafunc): function temp_file (line 45) | def temp_file(save_to): function binary_temp_file (line 50) | def binary_temp_file(save_to): function stringio (line 55) | def stringio(): function assert_string_is_file_content (line 59) | def assert_string_is_file_content(file): function assert_string_is_path_content (line 64) | def assert_string_is_path_content(path): function assert_string_is_binary_content (line 69) | def assert_string_is_binary_content(file): function test_string_is_long (line 74) | def test_string_is_long(): function test_dump_to_string (line 78) | def test_dump_to_string(save_to): function test_dump_to_file (line 82) | def test_dump_to_file(save_to, stringio): function test_dump_is_behind_content_in_file (line 87) | def test_dump_is_behind_content_in_file(save_to, stringio): function test_dump_to_path (line 92) | def test_dump_to_path(save_to, tmpdir): function test_dump_to_temp_path (line 98) | def test_dump_to_temp_path(save_to): function test_dump_to_temporary_file (line 103) | def test_dump_to_temporary_file(temp_file): function test_dump_to_temporary_binary_file (line 107) | def test_dump_to_temporary_binary_file(binary_temp_file): function test_temporary_file_is_deleted_on_default (line 111) | def test_temporary_file_is_deleted_on_default(temp_file): function test_binary_temporary_file_is_deleted_on_default (line 115) | def test_binary_temporary_file_is_deleted_on_default(binary_temp_file): function assert_temporary_file_is_deleted (line 119) | def assert_temporary_file_is_deleted(temp_file): function assert_temporary_file_is_not_deleted (line 124) | def assert_temporary_file_is_not_deleted(temp_file): function test_temporary_file_exists (line 129) | def test_temporary_file_exists(temp_file): function test_binary_temporary_file_exists (line 133) | def test_binary_temporary_file_exists(binary_temp_file): function test_temporary_file_has_option_for_deletion (line 137) | def test_temporary_file_has_option_for_deletion(save_to): function test_binary_temporary_file_has_option_for_deletion (line 142) | def test_binary_temporary_file_has_option_for_deletion(save_to): function test_file_returns_new_file (line 147) | def test_file_returns_new_file(save_to): function test_dump_is_behind_content_in_new_file (line 152) | def test_dump_is_behind_content_in_new_file(save_to, stringio): function test_bytes (line 157) | def test_bytes(save_to): function test_encoding (line 161) | def test_encoding(save_to): function test_new_binary_file (line 165) | def test_new_binary_file(save_to): function test_binary_file (line 171) | def test_binary_file(save_to): function test_test_binary_file_is_at_end (line 178) | def test_test_binary_file_is_at_end(save_to): function test_encoding_is_none (line 182) | def test_encoding_is_none(no_encode_binary, no_encode_text): function test_temporary_path_has_extension (line 187) | def test_temporary_path_has_extension(save_to): function test_string_representation (line 192) | def test_string_representation(save_to): FILE: knittingpattern/test/test_example_code.py function test_load_from_example_and_create_svg (line 4) | def test_load_from_example_and_create_svg(): FILE: knittingpattern/test/test_example_rows.py function charlotte (line 7) | def charlotte(): function a1 (line 12) | def a1(charlotte): function a2 (line 18) | def a2(charlotte): function test_number_of_rows (line 23) | def test_number_of_rows(a1): function test_row_ids (line 30) | def test_row_ids(a1): function test_access_by_row_ids (line 36) | def test_access_by_row_ids(a1): function test_iterate_on_rows (line 41) | def test_iterate_on_rows(a1): FILE: knittingpattern/test/test_examples.py function charlotte (line 13) | def charlotte(): function cafe (line 18) | def cafe(): function test_number_of_patterns (line 22) | def test_number_of_patterns(charlotte): function pattern_0 (line 29) | def pattern_0(charlotte): function pattern_1 (line 34) | def pattern_1(charlotte): function test_names (line 38) | def test_names(pattern_0, pattern_1): function test_ids (line 43) | def test_ids(pattern_0, pattern_1): function test_access_with_id (line 48) | def test_access_with_id(charlotte): function test_iterate_on_pattern (line 52) | def test_iterate_on_pattern(charlotte): FILE: knittingpattern/test/test_id_collection.py function c (line 10) | def c(): function test_no_object (line 14) | def test_no_object(c): function test_add_object (line 19) | def test_add_object(c): function test_length (line 28) | def test_length(c): function test_at_raises_keyerror (line 36) | def test_at_raises_keyerror(c): FILE: knittingpattern/test/test_instruction.py function default_instruction (line 7) | def default_instruction(): function purl (line 12) | def purl(): function yo (line 17) | def yo(): function bindoff (line 22) | def bindoff(): function colored_instruction (line 27) | def colored_instruction(): function test_default_type (line 39) | def test_default_type(default_instruction): function test_default_color (line 45) | def test_default_color(default_instruction): function test_width (line 50) | def test_width(default_instruction, purl): function test_purl_is_not_knit (line 57) | def test_purl_is_not_knit(purl): function test_color (line 62) | def test_color(colored_instruction): function test_inheritance (line 68) | def test_inheritance(colored_instruction): function test_purl_produces_meshes (line 74) | def test_purl_produces_meshes(purl): function test_purl_consumes_meshes (line 78) | def test_purl_consumes_meshes(purl): function test_yarn_over_consumes_no_meshes (line 82) | def test_yarn_over_consumes_no_meshes(yo): function test_yarn_over_produces_meshes (line 87) | def test_yarn_over_produces_meshes(yo): function test_bindoff_consumes_meshes (line 92) | def test_bindoff_consumes_meshes(bindoff): function test_bindoff_produces_no_meshes (line 97) | def test_bindoff_produces_no_meshes(bindoff): class TestInstructionColors (line 102) | class TestInstructionColors(object): method test_get_colors_from_color_specification (line 108) | def test_get_colors_from_color_specification(self, spec, colors): FILE: knittingpattern/test/test_instruction_library.py function library (line 27) | def library(): function library2 (line 32) | def library2(library): function knit (line 42) | def knit(library): function purl (line 47) | def purl(library): function custom_knit (line 52) | def custom_knit(library): function test_knit_type_attributes (line 56) | def test_knit_type_attributes(knit): function test_knit_has_no_color (line 62) | def test_knit_has_no_color(knit): function test_purl_has_color (line 67) | def test_purl_has_color(purl): function test_not_everyting_is_known_by_purl (line 72) | def test_not_everyting_is_known_by_purl(purl): function test_custom_type (line 78) | def test_custom_type(custom_knit): function test_default_instruction_is_knit (line 82) | def test_default_instruction_is_knit(library): function test_library_does_not_forget_old_values (line 86) | def test_library_does_not_forget_old_values(library2): function test_library_can_load_multiple_times (line 90) | def test_library_can_load_multiple_times(library2): function test_library_handles_loading_several_instructions_with_same_type (line 94) | def test_library_handles_loading_several_instructions_with_same_type(lib... function test_access_via_type (line 98) | def test_access_via_type(library): function test_when_library_load_instruction_it_is_in_its_types (line 104) | def test_when_library_load_instruction_it_is_in_its_types(library2): function test_unloaded_instruction_is_not_in_the_types (line 109) | def test_unloaded_instruction_is_not_in_the_types(library2): FILE: knittingpattern/test/test_instruction_row_inheritance.py function coloring_pattern (line 8) | def coloring_pattern(): function test_instruction_has_color (line 30) | def test_instruction_has_color(coloring_pattern, row_id, function test_rows_have_color (line 47) | def test_rows_have_color(coloring_pattern, row_id, color): FILE: knittingpattern/test/test_knittingpattern.py class TestInstructionColors (line 10) | class TestInstructionColors(object): method unique (line 15) | def unique(self, monkeypatch): method rows_in_knit_order (line 21) | def rows_in_knit_order(self, rows, monkeypatch): method rows (line 28) | def rows(self): method knittingpattern (line 32) | def knittingpattern(self, rows): method test_result (line 35) | def test_result(self, knittingpattern, unique, rows_in_knit_order): method test_call_arguments (line 38) | def test_call_arguments(self, knittingpattern, unique, rows, method test_chalotte (line 44) | def test_chalotte(self, a1): method test_cafe (line 47) | def test_cafe(self): FILE: knittingpattern/test/test_load_instructions.py function lib (line 7) | def lib(): function test_load_from_relative_file (line 11) | def test_load_from_relative_file(lib): function test_load_from_relative_folder (line 18) | def test_load_from_relative_folder(lib): function test_load_from_folder (line 24) | def test_load_from_folder(lib): function test_loading_from_folder_recursively (line 31) | def test_loading_from_folder_recursively(lib): FILE: knittingpattern/test/test_loader.py function result (line 10) | def result(): function loader (line 15) | def loader(result): function path_loader (line 28) | def path_loader(): function jsonloader (line 33) | def jsonloader(result): function test_loading_object_does_nothing (line 37) | def test_loading_object_does_nothing(loader, result): function test_processing_result_is_returned (line 43) | def test_processing_result_is_returned(loader): function test_json_loader_loads_json (line 48) | def test_json_loader_loads_json(jsonloader, result): function test_loader_would_like_to_load_path (line 53) | def test_loader_would_like_to_load_path(loader): function test_loader_does_not_like_certain_paths (line 57) | def test_loader_does_not_like_certain_paths(loader): function test_loader_can_select_paths_it_likes (line 61) | def test_loader_can_select_paths_it_likes(loader): function test_loading_from_directory_selects_paths (line 66) | def test_loading_from_directory_selects_paths(loader): function example_path (line 74) | def example_path(example): function test_load_example (line 79) | def test_load_example(path_loader, example): function test_load_examples (line 85) | def test_load_examples(path_loader): FILE: knittingpattern/test/test_parsing.py function temp_empty_pattern_path (line 12) | def temp_empty_pattern_path(tmpdir): function assert_is_pattern (line 19) | def assert_is_pattern(pattern): function test_can_import_empty_pattern_from_object (line 24) | def test_can_import_empty_pattern_from_object(): function test_can_import_empty_pattern_from_string (line 29) | def test_can_import_empty_pattern_from_string(): function test_can_import_empty_pattern_from_file_object (line 35) | def test_can_import_empty_pattern_from_file_object(temp_empty_pattern_pa... function test_can_import_empty_pattern_from_path (line 41) | def test_can_import_empty_pattern_from_path(temp_empty_pattern_path): function test_knitting_pattern_type_is_present (line 46) | def test_knitting_pattern_type_is_present(): function test_knitting_pattern_type_is_correct (line 51) | def test_knitting_pattern_type_is_correct(): function test_load_from_url (line 56) | def test_load_from_url(temp_empty_pattern_path): FILE: knittingpattern/test/test_row_instructions.py function a1 (line 12) | def a1(): function row0 (line 18) | def row0(a1): function row1 (line 23) | def row1(a1): function row2 (line 28) | def row2(a1): function mesh0 (line 33) | def mesh0(row0): function instruction0 (line 39) | def instruction0(row0): function instruction1 (line 44) | def instruction1(row1): function removed_instruction (line 49) | def removed_instruction(row0): function test_row0_consumes_empty_meshes (line 53) | def test_row0_consumes_empty_meshes(row0): function test_consumed_meshes_have_index (line 58) | def test_consumed_meshes_have_index(row0): function test_row0_produces_5_meshes (line 65) | def test_row0_produces_5_meshes(row0): function test_row0_meshes_point_also_to_row1 (line 70) | def test_row0_meshes_point_also_to_row1(mesh0, row0, row1): function test_row0_instruction_produces_mesh_0 (line 75) | def test_row0_instruction_produces_mesh_0(mesh0, instruction0): function test_instruction0_is_knit (line 81) | def test_instruction0_is_knit(instruction0): function test_instruction_position_in_row (line 85) | def test_instruction_position_in_row(row0, instruction0): function test_mesh0_is_consumed_by_instruction1 (line 91) | def test_mesh0_is_consumed_by_instruction1(mesh0, instruction1): function test_instruction1_is_knit (line 96) | def test_instruction1_is_knit(instruction1): function test_instruction1_position_in_row (line 100) | def test_instruction1_position_in_row(instruction1): function test_mesh0_is_produced (line 104) | def test_mesh0_is_produced(mesh0): function test_instruction0_builds_on_unproduced_meshes (line 109) | def test_instruction0_builds_on_unproduced_meshes(instruction0): function skp (line 114) | def skp(row2): function yo (line 119) | def yo(row2): function test_yarn_over (line 123) | def test_yarn_over(yo): function test_skp (line 128) | def test_skp(skp): function test_position_in_row2 (line 133) | def test_position_in_row2(skp, yo, row2): function test_skp_consumed_meshes_from_row1 (line 140) | def test_skp_consumed_meshes_from_row1(skp, row1, row2): function test_skp_produces_one_mesh (line 157) | def test_skp_produces_one_mesh(skp): function test_skp_produced_meshes (line 161) | def test_skp_produced_meshes(skp, row2): function test_yarn_over_consumes_no_meshes (line 170) | def test_yarn_over_consumes_no_meshes(yo): function test_yarn_over_produces_a_mesh (line 174) | def test_yarn_over_produces_a_mesh(yo): function test_previous_instruction (line 182) | def test_previous_instruction(row0, instruction0): function test_next_instruction (line 186) | def test_next_instruction(row0, instruction0): function test_previous_instruction_is_None_at_border (line 190) | def test_previous_instruction_is_None_at_border(instruction0): function test_next_instruction_is_None_at_border (line 194) | def test_next_instruction_is_None_at_border(row0): function test_index_of_instruction_does_not_change (line 198) | def test_index_of_instruction_does_not_change(instruction0): function test_repr (line 204) | def test_repr(instruction0): function test_instruction_consumes_no_mesh_but_has_mesh_index (line 211) | def test_instruction_consumes_no_mesh_but_has_mesh_index(yo): function test_index_of_last_produced_mesh_is_same_as_first (line 216) | def test_index_of_last_produced_mesh_is_same_as_first(yo): function test_removed_instruction_raises_exception (line 222) | def test_removed_instruction_raises_exception(removed_instruction): function test_instruction_is_in_row (line 233) | def test_instruction_is_in_row(instruction0): function test_instruction_is_not_in_row (line 237) | def test_instruction_is_not_in_row(removed_instruction): function test_repr_removed_instruction (line 241) | def test_repr_removed_instruction(removed_instruction): function test_repr_meshes (line 245) | def test_repr_meshes(instruction0, row2): class TestShortAccess (line 251) | class TestShortAccess(object): method test_first_instruction (line 255) | def test_first_instruction(self, a1): method test_last_instruction (line 259) | def test_last_instruction(self, a1): class TestInstructionColors (line 264) | class TestInstructionColors(object): method test_row_instructions (line 273) | def test_row_instructions(self, specs, result, row_spec, default_color): FILE: knittingpattern/test/test_row_mapping.py function p1 (line 11) | def p1(): function a1 (line 16) | def a1(p1): function r11 (line 21) | def r11(a1): function r21 (line 26) | def r21(a1): function r22 (line 31) | def r22(a1): function r32 (line 36) | def r32(a1): function r41 (line 41) | def r41(a1): function assert_rows_map (line 47) | def assert_rows_map(row1, index1, row2, index2): function assert_is_not_connected (line 53) | def assert_is_not_connected(row, index): class TestRow11 (line 57) | class TestRow11: method test_first_meshes_map_to_second_row (line 59) | def test_first_meshes_map_to_second_row(self, r11, r21): method test_middle_mesh_does_not_map_to_any_row (line 63) | def test_middle_mesh_does_not_map_to_any_row(self, r11): method test_right_meshes_map_to_third_row (line 66) | def test_right_meshes_map_to_third_row(self, r11, r22): method test_number_of_meshes (line 70) | def test_number_of_meshes(self, r11): class TestRow21 (line 75) | class TestRow21: method test_all_meshes_map_to_last_row (line 77) | def test_all_meshes_map_to_last_row(self, r21, r41): method test_number_of_meshes (line 81) | def test_number_of_meshes(self, r21): class TestRow22 (line 86) | class TestRow22: method test_all_meshes_map_to_row_3 (line 88) | def test_all_meshes_map_to_row_3(self, r22, r32): class TestRow32 (line 93) | class TestRow32: method test_all_meshes_map_to_last_row (line 95) | def test_all_meshes_map_to_last_row(self, r32, r41): class TestRow41 (line 100) | class TestRow41: method test_row_maps_to_nowhere (line 102) | def test_row_maps_to_nowhere(self, r41): method test_number_of_meshes (line 106) | def test_number_of_meshes(self, r41): FILE: knittingpattern/test/test_row_meshes.py function assert_consumed_index (line 10) | def assert_consumed_index(mesh, instruction_index, index_in_instruction=0): function assert_produced_index (line 15) | def assert_produced_index(mesh, instruction_index, index_in_instruction=0): function assert_row (line 20) | def assert_row(row, first_consumed, last_consumed, first_produced, function row (line 29) | def row(): function test_no_meshes (line 34) | def test_no_meshes(row): function test_knit_row (line 45) | def test_knit_row(row): function test_1_or_0 (line 50) | def test_1_or_0(row): function test_2 (line 55) | def test_2(row): function test_2_reversed (line 60) | def test_2_reversed(row): FILE: knittingpattern/test/test_utilities.py class TestUniquenes (line 5) | class TestUniquenes(object): method test_results (line 14) | def test_results(self, input, expected_result, use_generator): FILE: knittingpattern/test/test_walk.py function walk_ids (line 7) | def walk_ids(pattern): function test_test_patterns (line 18) | def test_test_patterns(pattern_file, expected_ids): function construct_graph (line 25) | def construct_graph(links): function test_graphs_are_sorted (line 49) | def test_graphs_are_sorted(links, expected_ids): FILE: knittingpattern/utils.py function unique (line 8) | def unique(iterables): FILE: knittingpattern/walk.py function walk (line 4) | def walk(knitting_pattern): FILE: setup.py function read_file_named (line 22) | def read_file_named(file_name): function read_requirements_file (line 28) | def read_requirements_file(file_name): class TestCommand (line 58) | class TestCommand(TestCommandBase): method finalize_options (line 62) | def finalize_options(self): method run_tests (line 66) | def run_tests(self): class CoverageTestCommand (line 72) | class CoverageTestCommand(TestCommand): class PEP8TestCommand (line 76) | class PEP8TestCommand(TestCommand): class FlakesTestCommand (line 80) | class FlakesTestCommand(TestCommand): class CoveragePEP8TestCommand (line 84) | class CoveragePEP8TestCommand(TestCommand): class LintCommand (line 88) | class LintCommand(TestCommandBase): method finalize_options (line 92) | def finalize_options(self): method run_tests (line 96) | def run_tests(self): class LinkIntoSitePackagesCommand (line 104) | class LinkIntoSitePackagesCommand(Command): method initialize_options (line 112) | def initialize_options(self): method finalize_options (line 115) | def finalize_options(self): method run (line 118) | def run(self): method run_linux_link (line 137) | def run_linux_link(self): method run_windows_link (line 143) | def run_windows_link(self): class PrintRequiredPackagesCommand (line 158) | class PrintRequiredPackagesCommand(Command): method initialize_options (line 165) | def initialize_options(self): method finalize_options (line 168) | def finalize_options(self): method run (line 172) | def run(): class TagAndDeployCommand (line 200) | class TagAndDeployCommand(Command): method initialize_options (line 209) | def initialize_options(self): method finalize_options (line 212) | def finalize_options(self): method run (line 215) | def run(self): function main (line 283) | def main():