# Path: atrcopy/utils.py
# def uuid():
# def to_numpy(value):
# def to_numpy_list(value):
# def text_to_int(text, default_base="hex"):
#     def __init__(self, sector_size, data=None, num=-1):
#     def __str__(self):
#     def sector_num(self):
#     def sector_num(self, value):
#     def next_sector_num(self):
#     def next_sector_num(self, value):
#     def space_remaining(self):
#     def is_empty(self):
#     def add_data(self, data):
#     def __init__(self, header):
#     def __len__(self):
#     def __str__(self):
#     def __getitem__(self, index):
#     def num_sectors(self):
#     def first_sector(self):
#     def bytes_used(self):
#     def append(self, sector):
#     def extend(self, sectors):
#     def __init__(self, file_num=0):
#     def __eq__(self, other):
#     def extra_metadata(self, image):
#     def mark_deleted(self):
#     def parse_raw_dirent(self, image, bytes):
#     def encode_dirent(self):
#     def get_sectors_in_vtoc(self, image):
#     def start_read(self, image):
#     def read_sector(self, image):
#     def __init__(self, header, num_dirents=-1, sector_class=WriteableSector):
#     def set(self, index, dirent):
#     def get_free_dirent(self):
#     def add_dirent(self, filename, filetype):
#     def find_dirent(self, filename):
#     def save_dirent(self, image, dirent, vtoc, sector_list):
#     def remove_dirent(self, image, dirent, vtoc, sector_list):
#     def dirent_class(self):
#     def calc_sectors(self, image):
#     def get_dirent_sector(self):
#     def encode_empty(self):
#     def encode_dirent(self, dirent):
#     def store_encoded(self, data):
#     def finish_encoding(self, image):
#     def set_sector_numbers(self, image):
#     def __init__(self, header, segments=None):
#     def __str__(self):
#     def num_free_sectors(self):
#     def iter_free_sectors(self):
#     def parse_segments(self, segments):
#     def assign_sector_numbers(self, dirent, sector_list):
#     def reserve_space(self, num):
#     def get_next_free_sector(self):
#     def calc_bitmap(self):
#     def free_sector_list(self, sector_list):
# class WriteableSector:
# class BaseSectorList:
# class Dirent:
# class Directory(BaseSectorList):
# class VTOC(BaseSectorList):


from builtins import object
from mock import *
from atrcopy import utils


class TestTextToInt:
    def setup(self):
        pass

    @pytest.mark.parametrize("text,expected,default_base", [
        ("12", 0x12, "hex"),
        ("$1234", 0x1234, "hex"),
        ("0xffff", 0xffff, "hex"),
        ("#12", 12, "hex"),
        ("%11001010", 202, "hex"),

        ("12", 12, "dec"),
        ("$1234", 0x1234, "dec"),
        ("0xffff", 0xffff, "dec"),
        ("#12", 12, "dec"),
        ("%11001010", 202, "dec"),
        ])
    def test_text_to_int(self, text, expected, default_base):

# Path: atrcopy/utils.py
# def uuid():
# def to_numpy(value):
# def to_numpy_list(value):
# def text_to_int(text, default_base="hex"):
#     def __init__(self, sector_size, data=None, num=-1):
#     def __str__(self):
#     def sector_num(self):
#     def sector_num(self, value):
#     def next_sector_num(self):
#     def next_sector_num(self, value):
#     def space_remaining(self):
#     def is_empty(self):
#     def add_data(self, data):
#     def __init__(self, header):
#     def __len__(self):
#     def __str__(self):
#     def __getitem__(self, index):
#     def num_sectors(self):
#     def first_sector(self):
#     def bytes_used(self):
#     def append(self, sector):
#     def extend(self, sectors):
#     def __init__(self, file_num=0):
#     def __eq__(self, other):
#     def extra_metadata(self, image):
#     def mark_deleted(self):
#     def parse_raw_dirent(self, image, bytes):
#     def encode_dirent(self):
#     def get_sectors_in_vtoc(self, image):
#     def start_read(self, image):
#     def read_sector(self, image):
#     def __init__(self, header, num_dirents=-1, sector_class=WriteableSector):
#     def set(self, index, dirent):
#     def get_free_dirent(self):
#     def add_dirent(self, filename, filetype):
#     def find_dirent(self, filename):
#     def save_dirent(self, image, dirent, vtoc, sector_list):
#     def remove_dirent(self, image, dirent, vtoc, sector_list):
#     def dirent_class(self):
#     def calc_sectors(self, image):
#     def get_dirent_sector(self):
#     def encode_empty(self):
#     def encode_dirent(self, dirent):
#     def store_encoded(self, data):
#     def finish_encoding(self, image):
#     def set_sector_numbers(self, image):
#     def __init__(self, header, segments=None):
#     def __str__(self):
#     def num_free_sectors(self):
#     def iter_free_sectors(self):
#     def parse_segments(self, segments):
#     def assign_sector_numbers(self, dirent, sector_list):
#     def reserve_space(self, num):
#     def get_next_free_sector(self):
#     def calc_bitmap(self):
#     def free_sector_list(self, sector_list):
# class WriteableSector:
# class BaseSectorList:
# class Dirent:
# class Directory(BaseSectorList):
# class VTOC(BaseSectorList):


# Path: test/test_utils.py
from builtins import object
from mock import *
from atrcopy import utils



class TestTextToInt:
    def setup(self):
        pass

    @pytest.mark.parametrize("text,expected,default_base", [
        ("12", 0x12, "hex"),
        ("$1234", 0x1234, "hex"),
        ("0xffff", 0xffff, "hex"),
        ("#12", 12, "hex"),
        ("%11001010", 202, "hex"),

        ("12", 12, "dec"),
        ("$1234", 0x1234, "dec"),
        ("0xffff", 0xffff, "dec"),
        ("#12", 12, "dec"),
        ("%11001010", 202, "dec"),
        ])
    def test_text_to_int(self, text, expected, default_base):

        assert expected == utils.text_to_int(text, default_base)