<commit_before>from nose import tools
from scripttest import TestFileEnvironment


def test_package_operations():
    env = TestFileEnvironment()
    result = env.run('ws', 'new', 'something')

    tools.assert_in('something', result.files_created)

    mounts_list = env.run('ws', 'mounts', cwd=env.cwd + '/something')
    tools.assert_in('no defined inputs', mounts_list.stdout)

    pack_result = env.run('ws', 'pack', cwd=env.cwd + '/something')

    package, = pack_result.files_created.keys()

    result = env.run('ws', 'develop', 'something-develop', package)

    tools.assert_in('something-develop', result.files_created)<commit_msg>protect HOME directory from integration test<commit_after>from scripttest import TestFileEnvironment

import fixtures
from testtools import TestCase


class Test_command_line(TestCase):

    def test_package_operations(self):
        self.useFixture(fixtures.TempHomeDir())
        env = TestFileEnvironment()
        result = env.run('ws', 'new', 'something')

        self.assertIn('something', result.files_created)

        mounts_list = env.run('ws', 'mounts', cwd=env.cwd + '/something')
        self.assertIn('no defined inputs', mounts_list.stdout)

        pack_result = env.run('ws', 'pack', cwd=env.cwd + '/something')

        package, = pack_result.files_created.keys()

        result = env.run('ws', 'develop', 'something-develop', package)

        self.assertIn('something-develop', result.files_created)
{'fraction_non_alphanumeric': 0.1359289617486339, 'fraction_numerical': 0.0, 'mean_word_length': 4.176678445229682, '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': '2737690', 'n_tokens_mistral': 445, 'n_tokens_neox': 423, 'n_words': 91}