<commit_before>try:
    from . import generic as g
except BaseException:
    import generic as g
from shapely.geometry import Polygon


class PackingTest(g.unittest.TestCase):

    def setUp(self):
        self.nestable = [Polygon(i) for i in g.data['nestable']]

    def test_obb(self):
        from trimesh.path import packing
        inserted, transforms = packing.multipack(self.nestable)

    def test_paths(self):
        from trimesh.path import packing
        paths = [g.trimesh.load_path(i) for i in self.nestable]

        r, inserted = packing.pack_paths(paths)

        # number of paths inserted
        count = len(g.np.unique(inserted))
        # should have inserted all our paths
        assert count == len(paths)
        # splitting should result in the right number of paths
        assert count == len(r.split())<commit_msg>Lazily import shapely during testing<commit_after>try:
    from . import generic as g
except BaseException:
    import generic as g


class PackingTest(g.unittest.TestCase):

    def setUp(self):
        from shapely.geometry import Polygon
        self.nestable = [Polygon(i) for i in g.data['nestable']]

    def test_obb(self):
        from trimesh.path import packing
        inserted, transforms = packing.multipack(self.nestable)

    def test_paths(self):
        from trimesh.path import packing
        paths = [g.trimesh.load_path(i) for i in self.nestable]

        r, inserted = packing.pack_paths(paths)

        # number of paths inserted
        count = len(g.np.unique(inserted))
        # should have inserted all our paths
        assert count == len(paths)
        # splitting should result in the right number of paths
        assert count == len(r.split())
{'fraction_non_alphanumeric': 0.08589669181659895, 'fraction_numerical': 0.0, 'mean_word_length': 2.691648822269807, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5733622', 'n_tokens_mistral': 514, 'n_tokens_neox': 495, 'n_words': 157}