# Path: gromacs/fileformats/convert.py
# def to_unicode(obj):
#     def __init__(self, mode="fancy",  mapping=None, active=True, sep=False, **kwargs):
#     def active():
#         def fget(self):
#         def fset(self, x):
#     def _convert_singlet(self, s):
#     def _convert_fancy(self, field):
# def besttype(x):
# def to_int64(a):
#     def promote_i4(typestr):
# def pyify(typestr):
# def to_pytypes(a):
# def irecarray_to_py(a):
#     def convert_record(r):
# class Autoconverter(object):


import pytest
from numpy.testing import assert_equal, assert_almost_equal
from gromacs.fileformats import convert
# -*- coding: utf-8 -*-
# GromacsWrapper
# Copyright (c) 2009 Oliver Beckstein <orbeckst@gmail.com>
# Released under the GNU Public License 3 (or higher, your choice)
# See the file COPYING for details.

from __future__ import division, absolute_import, print_function




@pytest.mark.parametrize(
    's,expected',
    [(100, 100),
     ("Jabberwock", u"Jabberwock"),
     (u"Ångström", u"Ångström"),
    ]
)
def test_to_unicode(s, expected):
    output = convert.to_unicode(s)
    assert output == expected

class TestAutoconverter(object):
    def _convert(self, s, **kwargs):
        ac = convert.Autoconverter(**kwargs)
        assert ac.active is True

# Path: gromacs/fileformats/convert.py
# def to_unicode(obj):
#     def __init__(self, mode="fancy",  mapping=None, active=True, sep=False, **kwargs):
#     def active():
#         def fget(self):
#         def fset(self, x):
#     def _convert_singlet(self, s):
#     def _convert_fancy(self, field):
# def besttype(x):
# def to_int64(a):
#     def promote_i4(typestr):
# def pyify(typestr):
# def to_pytypes(a):
# def irecarray_to_py(a):
#     def convert_record(r):
# class Autoconverter(object):


# Path: tests/fileformats/test_convert.py
import pytest
from numpy.testing import assert_equal, assert_almost_equal
from gromacs.fileformats import convert

# -*- coding: utf-8 -*-
# GromacsWrapper
# Copyright (c) 2009 Oliver Beckstein <orbeckst@gmail.com>
# Released under the GNU Public License 3 (or higher, your choice)
# See the file COPYING for details.

from __future__ import division, absolute_import, print_function




@pytest.mark.parametrize(
    's,expected',
    [(100, 100),
     ("Jabberwock", u"Jabberwock"),
     (u"Ångström", u"Ångström"),
    ]
)
def test_to_unicode(s, expected):
    output = convert.to_unicode(s)
    assert output == expected

class TestAutoconverter(object):
    def _convert(self, s, **kwargs):
        ac = convert.Autoconverter(**kwargs)
        assert ac.active is True

        return ac.convert(s)