From 1b1652a82ea1c4d3209940404feea52baa1dddc3 Mon Sep 17 00:00:00 2001 From: martinvoegele Date: Thu, 26 Aug 2021 01:03:46 -0700 Subject: [PATCH] tests for v0.1.7 --- setup.py | 4 ++-- tests/test_sequence.py | 25 +++++++++++++++++++++++++ tests/test_stub.py | 12 ------------ 3 files changed, 27 insertions(+), 14 deletions(-) create mode 100644 tests/test_sequence.py delete mode 100644 tests/test_stub.py diff --git a/setup.py b/setup.py index 1306240..c9f04fe 100644 --- a/setup.py +++ b/setup.py @@ -4,11 +4,11 @@ long_description = fh.read() setup(name='gpcrmining', - version='0.1.6', + version='0.1.7', description='Functions to scrape GPCR data from the web.', url='http://github.com/drorlab/GPCR-mining', author='Martin Voegele', - author_email='mvoegele@stanford.edu', + author_email='martinvoegele1989@gmail.com', license='MIT', packages=find_packages(include=[ 'gpcrmining', diff --git a/tests/test_sequence.py b/tests/test_sequence.py new file mode 100644 index 0000000..383983e --- /dev/null +++ b/tests/test_sequence.py @@ -0,0 +1,25 @@ +import pytest +import os +import importlib +import gpcrmining.gpcrdb as db + +gpcr_name = 'adrb1_human' +seq_num = [330, 232, 189, 228] +gen_num = ['6.41x41', '5.46x461', '4.56x56', '5.42x43'] + +def test_get_residue_info(): + res_info = db.get_residue_info(gpcr_name) + assert len(res_info) == 477 + assert res_info[0] == ['N-term', 1, 'M', ''] + assert res_info[99] == ['TM2', 100, 'L', '2.46x46'] + pass + +def test_gpcrdb_to_sequential(): + seq = db.gpcrdb_to_sequential(gpcr_name, gen_num) + assert seq == seq_num + pass + +def test_sequential_to_gpcrdb(): + gen = db.sequential_to_gpcrdb(gpcr_name, seq_num) + assert gen == gen_num + pass diff --git a/tests/test_stub.py b/tests/test_stub.py deleted file mode 100644 index c403e06..0000000 --- a/tests/test_stub.py +++ /dev/null @@ -1,12 +0,0 @@ -import pytest -import os -import importlib -import gpcrmining.gpcrdb as db - -receptor='adrb1_human' - -def test_stub(): - _ = db.get_residue_info(receptor) - assert 4 == 4 - pass -