def test_pcap_input():
    'test_pcap_input\n  '
    print('Testing PcapDataset')
    pcap_filename = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'test_pcap', 'http.pcap')
    file_url = ('file://' + pcap_filename)
    url_filenames = [file_url]
    dataset = pcap_io.PcapDataset(url_filenames, batch=1)
    packets_total = 0
    for v in dataset:
        (packet_timestamp, packet_data) = v
        if (packets_total == 0):
            assert (packet_timestamp.numpy()[0] == 1084443427.311224)
            assert (len(packet_data.numpy()[0]) == 62)
        packets_total += 1
    assert (packets_total == 43)
test_pcap_input
def ():
    '\n  '
    print('Testing PcapDataset')
    pcap_filename = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'test_pcap', 'http.pcap')
    file_url = ('file://' + pcap_filename)
    url_filenames = [file_url]
    dataset = pcap_io.PcapDataset(url_filenames, batch=1)
    packets_total = 0
    for v in dataset:
        (packet_timestamp, packet_data) = v
        if (packets_total == 0):
            assert (packet_timestamp.numpy()[0] == 1084443427.311224)
            assert (len(packet_data.numpy()[0]) == 62)
        packets_total += 1
    assert (packets_total == 43)