Skip to main content
Ctrl+K
KnotPy  documentation - Home KnotPy  documentation - Home
  • Install
  • Tutorial
  • Reference
  • Examples
  • GitHub
  • Install
  • Tutorial
  • Reference
  • Examples
  • GitHub

Section Navigation

  • algorithms
    • alternating
      • alternating_crossings
      • is_alternating
      • is_face_alternating
    • attributes
      • clear_attributes
      • clear_diagram_attributes
      • clear_endpoint_attributes
      • clear_node_attributes
      • clear_temporary_attributes
      • clear_temporary_diagram_attributes
      • clear_temporary_endpoint_attributes
      • clear_temporary_node_attributes
    • canonical
    • closure
    • components_link
      • link_components_endpoints
      • number_of_link_components
    • connected_sum
    • contract
      • contract_arc
    • cut_set
      • arc_cut_sets
      • cut_decomposition
      • cut_nodes
      • find_arc_cut_set
    • cycles
    • degree_sequence
    • disjoint_union
    • duality
      • arc_face_graph
      • dual_planar_diagram
    • insert
      • insert_arc
      • insert_endpoint
      • insert_loop
      • insert_new_leaf
      • parallelize_arc
    • join
      • bridge_join
      • crossing_join
    • naming
      • generate_node_names
      • multiple_unique_new_node_names
      • number_to_alpha
      • unique_new_node_name
    • orientation
      • all_orientations
      • orient
      • orient_edges
      • unorient
    • remove
      • remove_arc
      • remove_bivalent_vertex
      • remove_bivalent_vertices
      • remove_empty_nodes
      • remove_loops
      • remove_unknots
    • rewire
      • permute_node
      • pull_and_plug_endpoint
      • replug_endpoint
      • swap_endpoints
    • sanity
      • sanity_check
    • subdivide
      • subdivide_arc
      • subdivide_arcs_around_node
      • subdivide_endpoint
      • subdivide_endpoint_by_crossing
    • symmetry
      • flip
      • mirror
      • reverse
    • tangle
      • compose_tangles
      • is_integer_tangle
      • rotate
      • tangle_decompositions
    • tests
      • test_alternating
        • test_alternating
      • test_attributes__
      • test_canonical
        • test_canonical
        • test_canonical_degenerate
        • test_canonical_degenerate_oriented
        • test_canonical_knots
        • test_canonical_knots_oriented
        • test_canonical_oriented
      • test_closure
        • test_closure
      • test_component_links
        • test_number_of_link_components
      • test_contract
        • test_contract_arc
        • test_contract_edge
        • test_contract_edge_attributes
      • test_cut_set
        • test_arc_cut_set
        • test_cut_set_knotoid
        • test_cut_set_new
        • test_find_cut_sets
        • test_order_2
      • test_degree_sequence
        • test_deg_seq
      • test_disjoint_sum
        • test_disjoint_sum
        • test_unknots
      • test_features
        • test_bridges
      • test_insert
        • test_insert_attr
      • test_orientation
        • test_orientation
      • test_remove
        • test_remove_edge
      • test_reverse
        • test_reverse
      • test_rewire
        • test_pull_and_plug_endpoint_sanity
      • test_sanity
        • test_sanity_raises_on_none_endpoints
        • test_sanity_raises_on_oriented_arc_with_same_direction
        • test_sanity_valid_diagram
      • test_skein
        • test_skein
      • test_sums
        • helper_test_connected_sum_on_knots
        • test_all_connected_sums
        • test_connected_sum
        • test_disjoint_sum
      • test_tangles
        • test_decompose
        • test_tangle_63
    • topology
      • bridges
      • edges
      • is_bridge
      • is_empty_diagram
      • is_kink
      • is_knot
      • is_knotoid
      • is_leaf
      • is_link
      • is_linkoid
      • is_loop
      • is_planar_graph
      • is_unknot
      • is_unlink
      • kink_region_iterator
      • kinks
      • leafs
      • loops
      • number_of_unknots
      • overstrands
      • path_from_endpoint
  • classes
    • endpoint
      • ensure_arc
      • ensure_endpoint
      • Endpoint
      • IngoingEndpoint
      • OutgoingEndpoint
    • freezing
      • freeze
      • frozen
      • unfreeze
    • node
      • Node
    • planardiagram
      • Diagram
      • DiagramCollection
      • planar_diagram_from_data
      • OrientedPlanarDiagram
      • PlanarDiagram
    • tests
      • test_endpoint
      • test_faces
        • test_faces
        • test_hopf
      • test_freezing
        • test_freeze
      • test_init
        • test_knot_name
      • test_nodes
        • test_remove_bivalent_vertex
      • test_nothing
        • test_nothing
      • test_pickle
        • test_pickability
      • test_planardiagram
        • make_simple_diagram
        • test_add_crossings_from_and_degree_sequence
        • test_add_vertices_and_arcs
        • test_compare_ordering_by_size_and_degree
        • test_copy_shallow_and_attr_independence
        • test_orientation_constraints_in_oriented_diagram
        • test_planar_diagram_from_data_with_instance
        • test_relabel_nodes_updates_endpoints
        • test_remove_arc_and_endpoints
    • views
      • ArcView
      • EndpointView
      • FaceView
      • FilteredNodeView
      • NodeView
  • drawing
    • alignment
      • align_layouts
      • canonically_rotate_circles
    • draw
    • draw_tangle
      • add_corners_and_smoothen
      • angle_between_points
      • are_continuation
      • connect
      • crossings
      • draw
      • draw_smooth
      • integral
      • to_zigzag
      • TangleExpr
      • TangleProduct
      • TangleSum
      • ZigZag
    • dynamic_network
      • animate_simulation
      • plot_bead_frame
      • plot_force_history
      • plot_static_frame
      • simulation
      • Network
    • dynamic_simulation
      • init_network
    • export
      • export_pdf
      • export_pdf_groups
    • layout_circle_packing
    • tests
      • test_draw
        • DO_NOTtest_draw_bridges
        • test_draw_bonded
        • test_draw_knot
        • test_draw_knotoid
        • test_draw_theta
        • test_thetas_sums
      • test_export
        • test_export
      • test_knotoids_strange
        • test_draw_all
    • tutte_layout
  • invariants
    • affine_index
      • affine_index_polynomial
    • alexander
    • arrow
      • arrow_polynomial
      • disoriented_smoothing
    • bracket
    • cache
      • Cache
      • HashableSized
    • classifier
      • group_by_invariants
      • save_invariants
    • conway
    • fundamental_group
      • alexander_fox_matrix
      • fox_derivative
      • fundamental_group
    • homflypt
    • jones
    • kauffman
    • mock_alexander
      • mock_alexander_polynomial
    • skein
      • crossing_to_vertex
      • smoothen_crossing
    • tests
      • test_bracket
        • test_bracket
      • test_classifier
        • first_letter
        • last_letter
        • test_group_by_invariants
        • test_saver
      • test_gcd
        • check_expressions
        • test1
        • test2
      • test_homflypt
        • DO_NOT_test_homflypt
        • test_cache
      • test_jones
        • test_jones
      • test_knotoids
        • test_affine_index_polynomial
        • test_arrow_polynomial
        • test_kauffman_polynomial
        • test_mock_polynomial
        • test_yamada_polynomial
      • test_knotoids_hard
        • test_affine
        • test_arrow
        • test_bracket
        • test_mock
      • test_multivariable_alexander
        • test_link
      • test_tutte
        • test_deletion_contraction_cycle
        • test_deletion_contraction_parallel_edges
        • test_deletion_contraction_square_with_diagonal
      • test_yamada
        • test_thetas_recursive
        • test_yamada_examples_from_paper
        • test_yamada_moriuchi
        • test_yamada_reidemeister
    • tutte
      • deletion_contraction
      • tutte
    • unplugging
    • writhe
    • yamada
  • notation
    • dispatcher
      • from_notation_dispatcher
      • to_notation_dispatcher
    • dt
      • flatten_nested_list
      • from_dt_notation
      • to_dt_notation
    • em
      • from_condensed_em_notation
      • from_em_notation
      • to_condensed_em_notation
      • to_em_notation
    • native
      • from_knotpy_notation
      • to_knotpy_notation
    • pd
      • from_condensed_pd_notation
      • from_pd_notation
      • to_condensed_pd_notation
      • to_pd_notation
    • plantri
      • from_plantri_notation
      • to_plantri_notation
    • tests
      • test_notation
        • test_native_notation_from
        • test_native_notation_to
        • test_native_notation_to_from
      • test_plantri
        • test_from_plantri
  • reidemeister
    • all_reidemeister_moves
    • detour_generator
    • flype_generator
    • r1_add_kink_generator
    • r1_remove_kink_generator
    • r2_poke_generator
    • r2_unpoke_generator
    • r3_generator
    • r4_generator
    • r5_twist_generator
    • r5_untwist_generator
    • random_reidemeister_move
    • randomize_diagram
    • reidemeister_decreasing_moves_generator
    • reidemeister_increasing_moves_generator
    • reidemeister_moves_generator
    • reidemeister_preserving_moves_generator
  • utils
    • cache
      • Cache
    • circlepack
      • acxyz
      • circle_pack
      • flower
      • invert_around
      • invert_packing
      • normalize_packing
      • place
      • test_grid
    • decorators
      • total_ordering_from_compare
    • dict_utils
      • common_dict
      • compare_dicts
      • invert_dict
      • invert_dict_of_sets
      • invert_multi_dict
      • invert_nested_dict
      • ClassifierDict
      • IdentityDict
      • LazyDict
    • disjoint_union_set
      • DisjointSetUnion
    • geometry
      • angle_between
      • antipode
      • arc_from_circle_and_points
      • arc_from_diameter
      • bisect
      • bisector
      • bounding_box
      • circle_through_points
      • inverse_point_through_circle
      • is_angle_between
      • middle
      • orient_arc
      • perpendicular_arc
      • perpendicular_arc_through_point
      • perpendicular_line
      • split
      • tangent_line
      • translate
      • weighted_circle_center_mean
      • BoundingBox
      • Circle
      • CircularArc
      • Line
      • OrientedCircularArc
      • PolySegment
      • Segment
    • laurent
      • canonicalize_under_variable_permutation
      • extract_variables
      • normalize_laurent_polynomial
      • normalize_polynomial
      • normalize_symmetric
      • reciprocal
    • module
      • Module
    • parsing
      • parse_arc
      • parse_arcs
      • parse_endpoint
      • parse_spaced_rows
      • universal_list_of_lists_parser
    • progressbar
      • ProgressBar
      • bar
    • set_utils
      • powerset
      • LeveledSet
    • string_utils
      • multi_replace
    • test
      • test_cache
        • test_cache_eviction_on_full
        • test_cache_insertion_and_length_limits
        • test_eviction_prefers_longest_key
        • test_key_too_long_is_ignored
        • test_refuse_replace_when_key_not_shorter
      • test_circlepack
        • test_basic_circle_pack
        • test_disjoint_key_check
        • test_inversion_preserves_count
        • test_invert_around
        • test_negative_radius_check
        • test_normalization
      • test_combinatorics
      • test_dict
        • test_dict
      • test_dict_utils
        • test_classifier_dict_groups_by_functions
        • test_common_dict_empty_input
        • test_common_dict_intersection
        • test_compare_dicts_equal_simple
        • test_compare_dicts_exclude_and_include
        • test_compare_dicts_nested
        • test_compare_dicts_ordering_by_keys
        • test_compare_dicts_sets
        • test_compare_dicts_type_mismatch
        • test_identity_dict_missing_returns_key
        • test_invert_dict_duplicate_value_raises
        • test_invert_dict_of_sets
        • test_invert_dict_unique_values
        • test_invert_multi_dict_groups
        • test_invert_nested_dict
        • test_lazydict_loads_on_access_and_evaluates_once
        • test_lazydict_reload
      • test_dsu
        • test_dsu
        • test_find_unknown_and_known
        • test_iadd_and_setitem_shortcuts
        • test_init_and_add
        • test_iter_components_and_len
        • test_path_compression_idempotence
        • test_representatives_and_classes
        • test_to_dict_rep_map
        • test_to_set_and_unknown
        • test_union_and_connectivity
      • test_geometry
        • test_angles_helpers
        • test_antipode_and_inversion
        • test_arc_from_circle_and_points_and_diameter
        • test_bisector_and_middle
        • test_circle_circle_intersection_two_points
        • test_circle_circle_tangent_one_point
        • test_circle_contains_and_length
        • test_circle_through_points
        • test_circular_arc_contains_and_length
        • test_line_circle_intersection_two_points
        • test_line_param_and_contains
        • test_oriented_circular_arc_shorten
        • test_perpendicular_arc_through_point_and_perpendicular_arc
        • test_perpendicular_line_and_tangent_line
        • test_polysegment_length_and_sample
        • test_segment_contains_and_length
        • test_split_and_bisect_segment_and_arc
        • test_weighted_center_and_orient_arc
      • test_laurent
        • test_canonicalize_under_permutation_with_sign_change
        • test_canonicalize_under_variable_permutation_minimal_rep
        • test_extract_variables_with_and_without_prefix
        • test_normalize_laurent_polynomial
        • test_normalize_laurent_polynomial_make_nonnegative
        • test_normalize_polynomial_basic
        • test_normalize_symmetric_centering_and_sign
        • test_reciprocal_roundtrip
      • test_lazy_dict
        • test_lazy_eval
        • test_lazy_load
        • test_lazy_load_eval
      • test_module
        • test_add_sub_extend
        • test_append_combines_like_terms
        • test_construct_and_basic_ops
        • test_filter_and_sort_and_equality
        • test_module
        • test_radd_sum_zero_seed
        • test_scalar_multiply_divide
        • test_setitem_substitution
        • test_sympy_coefficients
      • test_parser
        • test_universal_list_of_lists_parser
      • test_set_utils
        • test_leveled_set
        • test_leveled_set_reidemeister
        • test_leveledset_contains_and_extend
        • test_leveledset_iter_level_indexing_and_errors
        • test_leveledset_no_conversion_basic_levels_and_counts
        • test_leveledset_remove_empty_levels_trailing_only
        • test_leveledset_with_conversion_roundtrip_and_ops
        • test_powerset_basic
      • test_value_partitioner
        • mod2
        • mod3
        • test_value_partitioner
  • Reference
  • algorithms
  • tests
  • test_insert

test_insert#

Functions

test_insert_attr()

test_insert_attr()#
On this page
  • test_insert_attr()

© Copyright 2025, Boštjan Gabrovšek.

Created using Sphinx 8.2.3.

Built with the PyData Sphinx Theme 0.16.1.