# Path: freesas/test/utilstests.py
# def get_datafile(name):
#     """Provides the full path of a test file,
#     downloading it from the internet if needed
# 
#     :param name: name of the file to get
#     :return: full path of the datafile
#     """
#     logger.info(f"Download file {name}")
#     fullpath = downloader.getfile(name)
#     return fullpath


import unittest
import pathlib
import logging
import codecs
import parse
from platform import system
from subprocess import run, PIPE, STDOUT
from os import linesep
from os.path import normpath
from numpy import loadtxt
from freesas.test.utilstests import get_datafile
"""End to end tests for auto_gpa.py """

__authors__ = ["Martha Brennich"]
__license__ = "MIT"
__date__ = "16/07/2021"


logger = logging.getLogger(__name__)

if system() == "Windows":
    free_bift = "free_bift.exe"
else:
    free_bift = "free_bift"


class TestBIFT(unittest.TestCase):
    """End to end tests for free_bift"""

    cwd = pathlib.Path.cwd()
    test_location = pathlib.Path(__file__)
    test_data_location = pathlib.Path(test_location.parent, "e2etest_data")
    bsa_filename = pathlib.Path(get_datafile("bsa_005_sub.dat"))
    sas_curve2_filename = pathlib.Path(get_datafile("SASDF52.dat"))

# Path: freesas/test/utilstests.py
# def get_datafile(name):
#     """Provides the full path of a test file,
#     downloading it from the internet if needed
# 
#     :param name: name of the file to get
#     :return: full path of the datafile
#     """
#     logger.info(f"Download file {name}")
#     fullpath = downloader.getfile(name)
#     return fullpath


# Path: e2etest/e2etest_bift.py
import unittest
import pathlib
import logging
import codecs
import parse
from platform import system
from subprocess import run, PIPE, STDOUT
from os import linesep
from os.path import normpath
from numpy import loadtxt
from freesas.test.utilstests import get_datafile

"""End to end tests for auto_gpa.py """

__authors__ = ["Martha Brennich"]
__license__ = "MIT"
__date__ = "16/07/2021"


logger = logging.getLogger(__name__)

if system() == "Windows":
    free_bift = "free_bift.exe"
else:
    free_bift = "free_bift"


class TestBIFT(unittest.TestCase):
    """End to end tests for free_bift"""

    cwd = pathlib.Path.cwd()
    test_location = pathlib.Path(__file__)
    test_data_location = pathlib.Path(test_location.parent, "e2etest_data")
    bsa_filename = pathlib.Path(get_datafile("bsa_005_sub.dat"))
    sas_curve2_filename = pathlib.Path(get_datafile("SASDF52.dat"))

    SASDFX7 = pathlib.Path(get_datafile("SASDFX7.dat"))