<commit_before>from __future__ import with_statement
import os
import stat
import errno

from nose.tools import eq_ as eq

from fs.test.util import assert_raises, maketemp
import fs


def test_stat_isdir():
    temp_dir = maketemp()

    p = fs.path(temp_dir)
    s = p.stat()
    assert(stat.S_ISDIR(s.st_mode))


def test_stat_isreg():
    temp_dir = maketemp()
    foo = os.path.join(temp_dir, u'foo')
    with open(foo, 'w') as f:
        f.write('bar')

    p = fs.path(foo)
    s = p.stat()
    assert(stat.S_ISREG(s.st_mode))


def test_stat_missing_file():
    temp_dir = maketemp()<commit_msg>Explicitly check boolean assertion result<commit_after>from __future__ import with_statement
import os
import stat
import errno

from nose.tools import eq_ as eq

from fs.test.util import assert_raises, maketemp
import fs


def test_stat_isdir():
    temp_dir = maketemp()

    p = fs.path(temp_dir)
    s = p.stat()
    assert(stat.S_ISDIR(s.st_mode) is True)


def test_stat_isreg():
    temp_dir = maketemp()
    foo = os.path.join(temp_dir, u'foo')
    with open(foo, 'w') as f:
        f.write('bar')

    p = fs.path(foo)
    s = p.stat()
    assert(stat.S_ISREG(s.st_mode) is True)


def test_stat_missing_file():
    temp_dir = maketemp()
{'fraction_non_alphanumeric': 0.11538461538461539, 'fraction_numerical': 0.0, 'mean_word_length': 3.4134275618374557, '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': '2056199', 'n_tokens_mistral': 490, 'n_tokens_neox': 468, 'n_words': 115}