def dimension_test(): l = [(features.ConstantPointCoordinates(), 160), (features.FirstNPoints(), 162), # TODO: Check (features.StrokeCount(), 1), (features.Ink(), 1) ] for alg, dimension in l: nose.tools.assert_equal(alg.get_dimension(), dimension)
def repr_and_str_test(): l = [features.ConstantPointCoordinates(), features.FirstNPoints(), features.StrokeCount(), features.Ink() ] for alg in l: str(alg) repr(alg)
def test_dimension(): algorithms = [ (features.ConstantPointCoordinates(), 160), (features.FirstNPoints(), 162), # TODO: Check (features.StrokeCount(), 1), (features.Ink(), 1), ] for algorithm, dimension in algorithms: assert algorithm.get_dimension() == dimension
def test_repr_and_str(): algorithms = [ features.ConstantPointCoordinates(), features.FirstNPoints(), features.StrokeCount(), features.Ink(), ] for algorithm in algorithms: str(algorithm) repr(algorithm)
def simple_execution_test(): algorithms = [ features.ConstantPointCoordinates(), features.ConstantPointCoordinates(strokes=0), features.FirstNPoints(), # features.Bitmap(), features.Ink(), features.AspectRatio(), features.Width(), features.Time(), features.CenterOfMass(), features.StrokeCenter(), features.StrokeCenter(8), features.StrokeIntersections(), features.ReCurvature() ] for algorithm in algorithms: recording = testhelper.get_symbol_as_handwriting(292934) algorithm(recording)