<commit_before>import posixpath

from utils import *


def test_create_dir_remove_exists(hdfs, request):
    testname = request.node.name
    fname = posixpath.join(TEST_DIR, testname)

    assert hdfs.exists(fname) == False

    assert hdfs.create_dir(fname)
    assert hdfs.exists(fname)

    assert hdfs.delete(fname)
    assert hdfs.exists(fname) == False


def test_create_dir_list(hdfs, request):
    testname = request.node.name
    fname = posixpath.join(TEST_DIR, testname)

    files = hdfs.list_dir(TEST_DIR)
    filenames = [f.name for f in files]
    assert fname not in filenames

    assert hdfs.create_dir(fname)<commit_msg>Explicit test == True<commit_after>import posixpath

from utils import *


def test_create_dir_remove_exists(hdfs, request):
    testname = request.node.name
    fname = posixpath.join(TEST_DIR, testname)

    assert hdfs.exists(fname) == False

    assert hdfs.create_dir(fname) == True
    assert hdfs.exists(fname) == True

    assert hdfs.delete(fname) == True
    assert hdfs.exists(fname) == False


def test_create_dir_list(hdfs, request):
    testname = request.node.name
    fname = posixpath.join(TEST_DIR, testname)

    files = hdfs.list_dir(TEST_DIR)
    filenames = [f.name for f in files]
    assert fname not in filenames

    assert hdfs.create_dir(fname)
{'fraction_non_alphanumeric': 0.09451219512195122, 'fraction_numerical': 0.0, 'mean_word_length': 3.791970802919708, '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': '4025248', 'n_tokens_mistral': 483, 'n_tokens_neox': 469, 'n_words': 100}