<commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from nose.tools import assert_equal, assert_true, raises, assert_is_none
from ODBPy.StandardSymbols import *

class TestStandardSymbolParsing(object):
    def testRound(self):
        assert_equal(Round(40.), Round.Parse("r40"))
        assert_equal(Round(3.5), Round.Parse("r3.5"))
        assert_is_none(Round.Parse("rabc"))
        assert_is_none(Round.Parse("s3.5"))

    def testSquare(self):
        assert_equal(Square(40.), Square.Parse("s40"))
        assert_equal(Square(3.5), Square.Parse("s3.5"))
        assert_is_none(Square.Parse("rabc"))
        assert_is_none(Square.Parse("r3.5"))

    def testRectangle(self):
        assert_equal(Rectangle(60., 30.), Rectangle.Parse("r60x30"))
        assert_equal(Rectangle(1., 2), Rectangle.Parse("r1x2"))
        assert_equal(Rectangle(5.1, 3.33), Rectangle.Parse("r5.1x3.33"))
        assert_is_none(Rectangle.Parse("rabc"))
        assert_is_none(Rectangle.Parse("r3.5"))
<commit_msg>Added oval test<commit_after>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from nose.tools import assert_equal, assert_true, raises, assert_is_none
from ODBPy.StandardSymbols import *

class TestStandardSymbolParsing(object):
    def testRound(self):
        assert_equal(Round(40.), Round.Parse("r40"))
        assert_equal(Round(3.5), Round.Parse("r3.5"))
        assert_is_none(Round.Parse("rabc"))
        assert_is_none(Round.Parse("s3.5"))

    def testSquare(self):
        assert_equal(Square(40.), Square.Parse("s40"))
        assert_equal(Square(3.5), Square.Parse("s3.5"))
        assert_is_none(Square.Parse("sabc"))
        assert_is_none(Square.Parse("r3.5"))

    def testRectangle(self):
        assert_equal(Rectangle(60., 30.), Rectangle.Parse("r60x30"))
        assert_equal(Rectangle(1., 2), Rectangle.Parse("r1x2"))
        assert_equal(Rectangle(5.1, 3.33), Rectangle.Parse("r5.1x3.33"))
        assert_is_none(Rectangle.Parse("rabc"))
        assert_is_none(Rectangle.Parse("r3.5"))

    def testOval(self):
        assert_equal(Oval(60., 30.), Oval.Parse("oval60x30"))
        assert_equal(Oval(1., 2), Oval.Parse("oval1x2"))
        assert_equal(Oval(5.1, 3.33), Oval.Parse("oval5.1x3.33"))
        assert_is_none(Rectangle.Parse("ovalabc"))
        assert_is_none(Rectangle.Parse("oval3.5"))


{'fraction_non_alphanumeric': 0.16774193548387098, 'fraction_numerical': 0.04989247311827957, 'mean_word_length': 3.756646216768916, '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': '346519', 'n_tokens_mistral': 869, 'n_tokens_neox': 821, 'n_words': 105}