<commit_before># Uses py.test.
from __future__ import print_function
import os
import sys

new_syspath = os.path.join(os.path.dirname(__file__), '..', '..')
sys.path.append(new_syspath)

import math
import numpy as np
import pytest

from misu import (
    kg, s, lb, minute, Hz, kHz, GHz, MHz, ft, BTU, MW, d, m3, inch, Pa, bar,
    cm, minutes, hr, m, dimensionless
)
from misu import EIncompatibleUnits, dimensions, QuantityNP

import numpy
numpy.set_printoptions(sign=' ')


a = 2.5 * kg / s
b = 34.67 * kg / s


def lookup_type(quantity):
    return 'Quantity: {} Type: {}'.format(quantity, quantity.unitCategory())


def test_representation():
    assert repr(a) == '9000 kg/hr'
    assert repr(b) == '1.248e+05 kg/hr'


def test_format_simple():
    assert '{:.2f}'.format(b) == '124812.00 kg/hr'


@pytest.mark.xfail(reason='This requires further work.')
def test_format_left_align():
    fmtstr = '{:<20.2f}'.format(b)
    assert fmtstr == '124812.00 kg/hr     '


@pytest.mark.xfail(reason='This requires further work.')
def test_format_right_align():<commit_msg>Try to fix formatting changes.<commit_after># Uses py.test.
from __future__ import print_function
import os
import sys

new_syspath = os.path.join(os.path.dirname(__file__), '..', '..')
sys.path.append(new_syspath)

import math
import numpy as np
import pytest

from misu import (
    kg, s, lb, minute, Hz, kHz, GHz, MHz, ft, BTU, MW, d, m3, inch, Pa, bar,
    cm, minutes, hr, m, dimensionless
)
from misu import EIncompatibleUnits, dimensions, QuantityNP

import numpy
try:
    numpy.set_printoptions(sign=' ')
except:
    pass


a = 2.5 * kg / s
b = 34.67 * kg / s


def lookup_type(quantity):
    return 'Quantity: {} Type: {}'.format(quantity, quantity.unitCategory())


def test_representation():
    assert repr(a) == '9000 kg/hr'
    assert repr(b) == '1.248e+05 kg/hr'


def test_format_simple():
    assert '{:.2f}'.format(b) == '124812.00 kg/hr'


@pytest.mark.xfail(reason='This requires further work.')
def test_format_left_align():
    fmtstr = '{:<20.2f}'.format(b)
    assert fmtstr == '124812.00 kg/hr     '


@pytest.mark.xfail(reason='This requires further work.')
def test_format_right_align():
{'fraction_non_alphanumeric': 0.15043438500228623, 'fraction_numerical': 0.03383630544124371, 'mean_word_length': 4.006864988558353, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3913967', 'n_tokens_mistral': 863, 'n_tokens_neox': 796, 'n_words': 214}