<commit_before># -*- coding: utf-8 -*-

from __future__ import absolute_import, division, print_function
from __future__ import unicode_literals

import nose
from nose.tools import *
from sknano.generators import GrapheneGenerator, \
    PrimitiveCellGrapheneGenerator, ConventionalCellGrapheneGenerator
from sknano.testing import GeneratorTestFixtures


class TestCase(GeneratorTestFixtures):

    def test1(self):
        generator = GrapheneGenerator(armchair_edge_length=5,
                                      zigzag_edge_length=5)
        generator.save()
        self.tmpdata.append(generator.fname)

    def test2(self):
        generator = ConventionalCellGrapheneGenerator(armchair_edge_length=5,
                                                      zigzag_edge_length=5)
        generator.save()
        self.tmpdata.append(generator.fname)

    def test3(self):
        generator = \
            GrapheneGenerator.from_conventional_cell(armchair_edge_length=5,
                                                     zigzag_edge_length=5)
        generator.save()
        self.tmpdata.append(generator.fname)

    def test4(self):
        generator = PrimitiveCellGrapheneGenerator(edge_length=5)
        generator.save()
        self.tmpdata.append(generator.fname)
        print(generator.Natoms)

    def test5(self):
        generator = \
            GrapheneGenerator.from_primitive_cell(edge_length=5)
        generator.save()
        self.tmpdata.append(generator.fname)

<commit_msg>updating graphene generator unit tests<commit_after># -*- coding: utf-8 -*-

from __future__ import absolute_import, division, print_function
from __future__ import unicode_literals

import nose
from nose.tools import *
from sknano.generators import GrapheneGenerator, \
    PrimitiveCellGrapheneGenerator, ConventionalCellGrapheneGenerator
from sknano.testing import GeneratorTestFixtures


class TestCase(GeneratorTestFixtures):

    def test1(self):
        generator = GrapheneGenerator(armchair_edge_length=5,
                                      zigzag_edge_length=5)
        generator.save()
        self.tmpdata.append(generator.fname)

    def test2(self):
        generator = ConventionalCellGrapheneGenerator(armchair_edge_length=5,
                                                      zigzag_edge_length=5)
        generator.save()
        self.tmpdata.append(generator.fname)

    def test3(self):
        generator = \
            GrapheneGenerator.from_conventional_cell(armchair_edge_length=5,
                                                     zigzag_edge_length=5)
        generator.atoms.update_attrs()
        generator.save(deepcopy=False)
        self.tmpdata.append(generator.fname)

    def test4(self):
        generator = PrimitiveCellGrapheneGenerator(edge_length=5)
        generator.save()
        self.tmpdata.append(generator.fname)
        print(generator.Natoms)

    def test5(self):
        generator = \
            GrapheneGenerator.from_primitive_cell(edge_length=5)
        generator.save()
        self.tmpdata.append(generator.fname)


{'fraction_non_alphanumeric': 0.07430240103828682, 'fraction_numerical': 0.009085009733939001, 'mean_word_length': 2.4408482142857144, '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': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7243444', 'n_tokens_mistral': 880, 'n_tokens_neox': 820, 'n_words': 133}