# Path: px/px_file.py
# class PxFileBuilder:
# class PxFile(object):
#     def __init__(self):
#     def build(self):
#     def __repr__(self):
#     def __init__(self, pid, filetype):
#     def __repr__(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def __hash__(self):
#     def __str__(self):
#     def _resolve_name(self):
#     def device_number(self):
#     def fifo_id(self):
#     def get_endpoints(self):
# def resolve_endpoint(endpoint):
# def call_lsof():
# def lsof_to_files(lsof):
# def get_all():


import re
import sys
from px import px_file
    from typing import List  # NOQA


if sys.version_info.major >= 3:
    # For mypy PEP-484 static typing validation


def test_lsof_to_files():
    lsof = ""

    lsof += "\0".join(["p123", "\n"])
    lsof += "\0".join(["fcwd", "a ", "tDIR", "n/", "\n"])
    lsof += "\0".join(["f5", "ar", "tREG", "ncontains\nnewline", "\n"])
    lsof += "\0".join(["f6", "aw", "tREG", "d0x42", "n/somefile", "\n"])
    lsof += "\0".join(["p456", "\n"])
    lsof += "\0".join(["f7", "au", "tREG", "n/someotherfile", "\n"])
    lsof += "\0".join(["f7", "a ", "n(revoked)", "\n"])


# Path: px/px_file.py
# class PxFileBuilder:
# class PxFile(object):
#     def __init__(self):
#     def build(self):
#     def __repr__(self):
#     def __init__(self, pid, filetype):
#     def __repr__(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def __hash__(self):
#     def __str__(self):
#     def _resolve_name(self):
#     def device_number(self):
#     def fifo_id(self):
#     def get_endpoints(self):
# def resolve_endpoint(endpoint):
# def call_lsof():
# def lsof_to_files(lsof):
# def get_all():


# Path: tests/px_file_test.py
import re
import sys
from px import px_file
    from typing import List  # NOQA



if sys.version_info.major >= 3:
    # For mypy PEP-484 static typing validation


def test_lsof_to_files():
    lsof = ""

    lsof += "\0".join(["p123", "\n"])
    lsof += "\0".join(["fcwd", "a ", "tDIR", "n/", "\n"])
    lsof += "\0".join(["f5", "ar", "tREG", "ncontains\nnewline", "\n"])
    lsof += "\0".join(["f6", "aw", "tREG", "d0x42", "n/somefile", "\n"])
    lsof += "\0".join(["p456", "\n"])
    lsof += "\0".join(["f7", "au", "tREG", "n/someotherfile", "\n"])
    lsof += "\0".join(["f7", "a ", "n(revoked)", "\n"])


    files = px_file.lsof_to_files(lsof)