# Path: tests/utils.py
# @contextmanager
# def temporary_file(content=None, mode=None, binary=False):
#     tmpf, tmpfname = tempfile.mkstemp()
#     os.close(tmpf)
# 
#     if mode is None:
#         if content is None:
#             mode = "rb"
#         else:
#             mode = "wb"
# 
#     tmpf = open(tmpfname, mode)
#     if content is not None:
#         if hasattr(content, "encode") and not binary:
#             tmpf.write(dedent(content).encode("utf8"))
#         else:
#             tmpf.write(content)
# 
#     tmpf.close()
#     yield tmpfname
#     try:
#         os.unlink(tmpfname)
#     except Exception:
#         # ignore exceptions; it happens sometimes on Windows in the CI environment
#         # that it cannot remove the temporary file because another process (?) is
#         # using it...
#         pass


import gzip
import io
import unittest
import warnings
    import networkx as nx
    import graph_tool as gt
    import pandas as pd
from igraph import Graph, InternalError
from .utils import temporary_file
        from pandas import DataFrame
    </node>
    <node id="n3">
    <data key="v_name">d</data>
    </node>
    <node id="n4">
    <data key="v_name">e</data>
    </node>
    <node id="n5">
    <data key="v_name">f</data>
    </node>
    <edge source="n0" target="n1">
    </edge>
    <edge source="n0" target="n2">
    </edge>
    <edge source="n0" target="n3">
    </edge>
    <edge source="n1" target="n2">
    </edge>
    <edge source="n3" target="n4">
    </edge>
    <edge source="n3" target="n5">
    </edge>
    <edge source="n4" target="n5">
    </edge>
</graph>
</graphml>
"""

class ForeignTests(unittest.TestCase):
    def testDIMACS(self):

# Path: tests/utils.py
# @contextmanager
# def temporary_file(content=None, mode=None, binary=False):
#     tmpf, tmpfname = tempfile.mkstemp()
#     os.close(tmpf)
# 
#     if mode is None:
#         if content is None:
#             mode = "rb"
#         else:
#             mode = "wb"
# 
#     tmpf = open(tmpfname, mode)
#     if content is not None:
#         if hasattr(content, "encode") and not binary:
#             tmpf.write(dedent(content).encode("utf8"))
#         else:
#             tmpf.write(content)
# 
#     tmpf.close()
#     yield tmpfname
#     try:
#         os.unlink(tmpfname)
#     except Exception:
#         # ignore exceptions; it happens sometimes on Windows in the CI environment
#         # that it cannot remove the temporary file because another process (?) is
#         # using it...
#         pass


# Path: tests/test_foreign.py
import gzip
import io
import unittest
import warnings
    import networkx as nx
    import graph_tool as gt
    import pandas as pd
from igraph import Graph, InternalError
from .utils import temporary_file
        from pandas import DataFrame

    </node>
    <node id="n3">
    <data key="v_name">d</data>
    </node>
    <node id="n4">
    <data key="v_name">e</data>
    </node>
    <node id="n5">
    <data key="v_name">f</data>
    </node>
    <edge source="n0" target="n1">
    </edge>
    <edge source="n0" target="n2">
    </edge>
    <edge source="n0" target="n3">
    </edge>
    <edge source="n1" target="n2">
    </edge>
    <edge source="n3" target="n4">
    </edge>
    <edge source="n3" target="n5">
    </edge>
    <edge source="n4" target="n5">
    </edge>
</graph>
</graphml>
"""

class ForeignTests(unittest.TestCase):
    def testDIMACS(self):

        with temporary_file(