Commit 209c6269 authored by Stephen Thompson's avatar Stephen Thompson

Issue #1 added a unit test to check that and requirements match

parent 6de810d7
# coding=utf-8
"""scikit-surgery-evaluation tests"""
import pytest
# Pytest style
def test_requirements_vs_setup():
Test that the requirements file matches
# setup=open("","r")
# setuptxt =
# setup.close()
with open("", "r") as f:
install_line = -1
for i, line in enumerate(searchlines):
if "install_requires" in line:
install_line = i
end_line = -1
for i, line in enumerate(searchlines[install_line:]):
if "]" in line:
end_line = install_line + i
setup_reqs = []
for line in searchlines[install_line + 1: end_line]:
req = line.replace(',', '').replace("'", "")
req = req.replace(' ', '').replace('\n','')
with open("requirements.txt","r") as f:
reqs = []
for line in searchlines:
if "#" not in line:
for setup_req in setup_reqs:
assert setup_req in reqs
for req in reqs:
assert req in setup_reqs
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment