# Path: tests/utils.py
# def temporary_file(content=None, mode=None, binary=False):


import unittest
    import numpy as np
from igraph import Graph, Edge, EdgeSeq, VertexSeq
from .utils import is_pypy
        self.assertRaises(ValueError, EdgeSeq, self.g, 112)
        self.assertRaises(ValueError, EdgeSeq, self.g, [112])
        self.assertTrue(self.g.es.graph == self.g)

    def testIndexing(self):
        n = self.g.ecount()
        for i in range(n):
            self.assertEqual(i, self.g.es[i].index)
            self.assertEqual(n - i - 1, self.g.es[-i - 1].index)
        self.assertRaises(IndexError, self.g.es.__getitem__, n)
        self.assertRaises(IndexError, self.g.es.__getitem__, -n - 1)
        self.assertRaises(TypeError, self.g.es.__getitem__, 1.5)

    @unittest.skipIf(np is None, "test case depends on NumPy")
    def testNumPyIndexing(self):
        n = self.g.ecount()
        for i in range(n):
            arr = np.array([i])
            self.assertEqual(i, self.g.es[arr[0]].index)

        arr = np.array([n])
        self.assertRaises(IndexError, self.g.es.__getitem__, arr[0])

        arr = np.array([-n - 1])
        self.assertRaises(IndexError, self.g.es.__getitem__, arr[0])

        arr = np.array([1.5])
        self.assertRaises(TypeError, self.g.es.__getitem__, arr[0])

        ind = [1, 3, 5, 8, 3, 2]

# Path: tests/utils.py
# def temporary_file(content=None, mode=None, binary=False):


# Path: tests/test_edgeseq.py
import unittest
    import numpy as np
from igraph import Graph, Edge, EdgeSeq, VertexSeq
from .utils import is_pypy

        self.assertRaises(ValueError, EdgeSeq, self.g, 112)
        self.assertRaises(ValueError, EdgeSeq, self.g, [112])
        self.assertTrue(self.g.es.graph == self.g)

    def testIndexing(self):
        n = self.g.ecount()
        for i in range(n):
            self.assertEqual(i, self.g.es[i].index)
            self.assertEqual(n - i - 1, self.g.es[-i - 1].index)
        self.assertRaises(IndexError, self.g.es.__getitem__, n)
        self.assertRaises(IndexError, self.g.es.__getitem__, -n - 1)
        self.assertRaises(TypeError, self.g.es.__getitem__, 1.5)

    @unittest.skipIf(np is None, "test case depends on NumPy")
    def testNumPyIndexing(self):
        n = self.g.ecount()
        for i in range(n):
            arr = np.array([i])
            self.assertEqual(i, self.g.es[arr[0]].index)

        arr = np.array([n])
        self.assertRaises(IndexError, self.g.es.__getitem__, arr[0])

        arr = np.array([-n - 1])
        self.assertRaises(IndexError, self.g.es.__getitem__, arr[0])

        arr = np.array([1.5])
        self.assertRaises(TypeError, self.g.es.__getitem__, arr[0])

        ind = [1, 3, 5, 8, 3, 2]

        arr = np.array(ind)