class_docstr: Unit tests for the
  :func:`~networkx.generators.directed.random_k_out_graph` function.
class_docstr_tok: ["Unit","tests","for","the",":","func",":","`","~networkx.generators.directed.random_k_out_graph","`","function","."]
docstr: Tests that the generated graph is `k`-out-regular.
docstr_tok: ["Tests","that","the","generated","graph","is","`","k","`","-out-regular","."]
code: def test_regularity(self):
      """Tests that the generated graph is `k`-out-regular."""
      n = 10
      k = 3
      alpha = 1
      G = random_k_out_graph(n, k, alpha)
      assert all(d == k for v, d in G.out_degree())
      G = random_k_out_graph(n, k, alpha, seed=42)
      assert all(d == k for v, d in G.out_degree())
  
file_path: networkx/networkx/generators/tests/test_directed.py
imports: import pytest
  import networkx
  from networkx.classes import Graph, MultiDiGraph
  from networkx.generators.directed import gn_graph, gnc_graph, gnr_graph, random_k_out_graph, random_uniform_k_out_graph, scale_free_graph
label_desc: Use image node_id 1 for calling the TestRandomKOutGraph obj's underlying member method code with example usage: obj.test_regularity() without return types