MCPcopy Create free account
hub / github.com/rthalley/dnspython / testToFileBinaryWithOrigin

Method testToFileBinaryWithOrigin

tests/test_zone.py:452–466  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

450 self.assertTrue(ok)
451
452 def testToFileBinaryWithOrigin(self):
453 z = dns.zone.from_file(here("example"), "example")
454 try:
455 f = open(here("example4-binary.out"), "wb")
456 z.to_file(f, want_origin=True)
457 f.close()
458 ok = compare_files(
459 "testToFileBinaryWithOrigin",
460 here("example4-binary.out"),
461 here("example4.good"),
462 )
463 finally:
464 if not _keep_output:
465 os.unlink(here("example4-binary.out"))
466 self.assertTrue(ok)
467
468 def testFromText(self):
469 z = dns.zone.from_text(example_text, "example.", relativize=True)

Callers

nothing calls this directly

Calls 5

hereFunction · 0.90
compare_filesFunction · 0.85
to_fileMethod · 0.80
unlinkMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected