<commit_before>import ./make-test.nix ({ lib, ...} : {
  name = "tinydns";
  meta = {
    maintainers = with lib.maintainers; [ basvandijk ];
  };
  nodes = {
    nameserver = { config, lib, ... } : let
      ip = (lib.head config.networking.interfaces.eth1.ipv4.addresses).address;
    in {
      networking.nameservers = [ ip ];
      services.tinydns = {
        enable = true;
        inherit ip;
        data = ''
          .foo.bar:${ip}
          +.bla.foo.bar:192.168.127.12:300
        '';
      };
    };
  };
  testScript = ''
    $nameserver->start;
    $nameserver->waitForUnit("tinydns.service");
    $nameserver->succeed("host bla.foo.bar | grep '1\.2\.3\.4'");
  '';
})<commit_msg>nixos/tinydns: port test to python<commit_after>import ./make-test-python.nix ({ lib, ...} : {
  name = "tinydns";
  meta = {
    maintainers = with lib.maintainers; [ basvandijk ];
  };
  nodes = {
    nameserver = { config, lib, ... } : let
      ip = (lib.head config.networking.interfaces.eth1.ipv4.addresses).address;
    in {
      networking.nameservers = [ ip ];
      services.tinydns = {
        enable = true;
        inherit ip;
        data = ''
          .foo.bar:${ip}
          +.bla.foo.bar:192.168.127.12:300
        '';
      };
    };
  };
  testScript = ''
    nameserver.start()
    nameserver.wait_for_unit("tinydns.service")
    nameserver.succeed("host bla.foo.bar | grep '1\.2\.3\.4'")
  '';
})
{'fraction_non_alphanumeric': 0.18207480592801695, 'fraction_numerical': 0.028228652081863093, 'mean_word_length': 2.0364025695931476, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1323479', 'n_tokens_mistral': 554, 'n_tokens_neox': 509, 'n_words': 76}