diff --git a/requirements.txt b/requirements.txt index 0dcf8ba..5050ebf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,5 @@ mkdocstrings>=0.13.6 mkdocs-material>=6.0.2 mypy>=0.782 pylint>=2.6.0 -pytest>=6.1.1 \ No newline at end of file +pytest>=6.1.1 +pytest-tspwplib@git+https://github.com/PatrickOHara/pytest-tspwplib.git#egg=pytest-tspwplib>=0.1.0 \ No newline at end of file diff --git a/setup.py b/setup.py index 6033d4f..573ace6 100644 --- a/setup.py +++ b/setup.py @@ -11,4 +11,14 @@ packages=["tspwplib"], python_requires=">=3.6", version="0.1", + classifiers=[ + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3 :: Only', + 'Operating System :: OS Independent', + 'License :: MIT License', + ], ) diff --git a/tests/conftest.py b/tests/conftest.py index b52ef19..1a75692 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,96 +1 @@ """Fixtures for testing""" - -import os -from pathlib import Path -import pytest -from tspwplib.types import Alpha, Generation, InstanceName - - -# add parser options - - -def pytest_addoption(parser): - """Add option to enable travis specific options""" - parser.addoption( - "--tsplib-root", - default=os.environ.get("TSPLIB_ROOT"), - required=False, - type=str, - help="Filepath to tsplib95 directory", - ) - parser.addoption( - "--oplib-root", - default=os.environ.get("OPLIB_ROOT"), - required=False, - type=str, - help="Filepath to oplib directory", - ) - - -# fixtures for filepaths - - -@pytest.fixture(scope="function") -def tsplib_root(request) -> Path: - """Root of tsplib95 data""" - return Path(request.config.getoption("--tsplib-root")) - - -@pytest.fixture(scope="function") -def oplib_root(request) -> Path: - """Root of the cloned OP lib""" - return Path(request.config.getoption("--oplib-root")) - - -# fixtures for types - - -@pytest.fixture( - scope="function", - params=[ - Generation.one, - Generation.two, - Generation.three, - ], -) -def generation(request) -> Generation: - """Loop through valid generations""" - # NOTE generation 4 has different alpha values - return request.param - - -@pytest.fixture(scope="function", params=[Alpha.fifty]) -def alpha(request) -> Alpha: - """Alpha values""" - return request.param - - -@pytest.fixture( - scope="function", - params=[ - InstanceName.eil76, - InstanceName.st70, - InstanceName.rat195, - ], -) -def instance_name(request) -> InstanceName: - """Loop through valid instance names""" - return request.param - - -# fixtures for complete graphs - - -@pytest.fixture( - scope="function", - params=[ - 0.0, - 0.1, - 0.5, - 0.9, - 1.0, - ], -) -def edge_removal_probability(request) -> float: - """Different valid values for probability of removing an edge""" - return request.param