about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-06-11 05:37:30 -0500
committerFrederick Muriuki Muriithi2025-06-11 05:37:30 -0500
commit91df005212363108f4deb31dc0fc81e2424547ce (patch)
tree51666cad37a262c8d82b5391a1ab668fe7d63d3e /tests
parent34161e8f6147120eae6530d9de501b0866bb84c6 (diff)
downloadgn-uploader-91df005212363108f4deb31dc0fc81e2424547ce.tar.gz
Fix issues caught by linter.
Diffstat (limited to 'tests')
-rw-r--r--tests/uploader/phenotypes/test_misc.py108
-rw-r--r--tests/uploader/publications/test_misc.py1
-rw-r--r--tests/uploader/test_parse.py3
3 files changed, 99 insertions, 13 deletions
diff --git a/tests/uploader/phenotypes/test_misc.py b/tests/uploader/phenotypes/test_misc.py
index c0261aa..cf475ad 100644
--- a/tests/uploader/phenotypes/test_misc.py
+++ b/tests/uploader/phenotypes/test_misc.py
@@ -218,12 +218,54 @@ __sample_db_phenotypes_data__ = (
               }
           }),
          __sample_db_phenotypes_data__,
-         ({"PhenotypeId": 4, "xref_id": 10001, "DataId": 8967043, "StrainId": 4, "StrainName": "BXD1", "value": 77.2},
-          {"PhenotypeId": 15, "xref_id": 10003, "DataId": 8967045, "StrainId": 6, "StrainName": "BXD5", "value": 503},
-          {"PhenotypeId": 15, "xref_id": 10003, "DataId": 8967045, "StrainId": 7, "StrainName": "BXD6", "value": 903},
-          {"PhenotypeId": 20, "xref_id": 10004, "DataId": 8967046, "StrainId": 3, "StrainName": "DBA/2J", "value": 1},
-          {"PhenotypeId": 20, "xref_id": 10004, "DataId": 8967046, "StrainId": 4, "StrainName": "BXD1", "value": 8},
-          {"PhenotypeId": 20, "xref_id": 10004, "DataId": 8967046, "StrainId": 5, "StrainName": "BXD2", "value": 9})),
+      ({
+          "PhenotypeId": 4,
+          "xref_id": 10001,
+          "DataId": 8967043,
+          "StrainId": 4,
+          "StrainName": "BXD1",
+          "value": 77.2
+      },
+       {
+           "PhenotypeId": 15,
+           "xref_id": 10003,
+           "DataId": 8967045,
+           "StrainId": 6,
+           "StrainName": "BXD5",
+           "value": 503
+       },
+       {
+           "PhenotypeId": 15,
+           "xref_id": 10003,
+           "DataId": 8967045,
+           "StrainId": 7,
+           "StrainName": "BXD6",
+           "value": 903
+       },
+       {
+           "PhenotypeId": 20,
+           "xref_id": 10004,
+           "DataId": 8967046,
+           "StrainId": 3,
+           "StrainName": "DBA/2J",
+           "value": 1
+       },
+       {
+           "PhenotypeId": 20,
+           "xref_id": 10004,
+           "DataId": 8967046,
+           "StrainId": 4,
+           "StrainName": "BXD1",
+           "value": 8
+       },
+       {
+           "PhenotypeId": 20,
+           "xref_id": 10004,
+           "DataId": 8967046,
+           "StrainId": 5,
+           "StrainName": "BXD2",
+           "value": 9
+       })),
 
      # Changes — with deletions
      (({
@@ -292,12 +334,54 @@ __sample_db_phenotypes_data__ = (
               }
           }),
          __sample_db_phenotypes_data__,
-         ({"PhenotypeId": 4, "xref_id": 10001, "DataId": 8967043, "StrainId": 4, "StrainName": "BXD1", "value": None},
-          {"PhenotypeId": 15, "xref_id": 10003, "DataId": 8967045, "StrainId": 6, "StrainName": "BXD5", "value": None},
-          {"PhenotypeId": 15, "xref_id": 10003, "DataId": 8967045, "StrainId": 7, "StrainName": "BXD6", "value": None},
-          {"PhenotypeId": 20, "xref_id": 10004, "DataId": 8967046, "StrainId": 3, "StrainName": "DBA/2J", "value": 15},
-          {"PhenotypeId": 20, "xref_id": 10004, "DataId": 8967046, "StrainId": 4, "StrainName": "BXD1", "value": None},
-          {"PhenotypeId": 20, "xref_id": 10004, "DataId": 8967046, "StrainId": 5, "StrainName": "BXD2", "value": 24}))))
+      ({
+          "PhenotypeId": 4,
+          "xref_id": 10001,
+          "DataId": 8967043,
+          "StrainId": 4,
+          "StrainName": "BXD1",
+          "value": None
+      },
+       {
+           "PhenotypeId": 15,
+           "xref_id": 10003,
+           "DataId": 8967045,
+           "StrainId": 6,
+           "StrainName": "BXD5",
+           "value": None
+       },
+       {
+           "PhenotypeId": 15,
+           "xref_id": 10003,
+           "DataId": 8967045,
+           "StrainId": 7,
+           "StrainName": "BXD6",
+           "value": None
+       },
+       {
+           "PhenotypeId": 20,
+           "xref_id": 10004,
+           "DataId": 8967046,
+           "StrainId": 3,
+           "StrainName": "DBA/2J",
+           "value": 15
+       },
+       {
+           "PhenotypeId": 20,
+           "xref_id": 10004,
+           "DataId": 8967046,
+           "StrainId": 4,
+           "StrainName": "BXD1",
+           "value": None
+       },
+       {
+           "PhenotypeId": 20,
+           "xref_id": 10004,
+           "DataId": 8967046,
+           "StrainId": 5,
+           "StrainName": "BXD2",
+           "value": 24
+       }))))
 def test_phenotypes_data_differences(filedata, dbdata, expected):
     """Test differences are computed correctly."""
     assert phenotypes_data_differences(filedata, dbdata) == expected
diff --git a/tests/uploader/publications/test_misc.py b/tests/uploader/publications/test_misc.py
index 7a52941..8c7e567 100644
--- a/tests/uploader/publications/test_misc.py
+++ b/tests/uploader/publications/test_misc.py
@@ -63,5 +63,6 @@ from uploader.publications.misc import publications_differences
        {"PhenotypeId": 1, "xref_id": 10004, "PublicationId": None,
         "PubMed_ID": None}))))
 def test_publications_differences(filedata, dbdata, pubmed2pubidmap, expected):
+    """Test publication differences — flesh out description…"""
     assert publications_differences(
         filedata, dbdata, pubmed2pubidmap) == expected
diff --git a/tests/uploader/test_parse.py b/tests/uploader/test_parse.py
index 076c47c..20c75b7 100644
--- a/tests/uploader/test_parse.py
+++ b/tests/uploader/test_parse.py
@@ -8,7 +8,8 @@ from uploader.jobs import job, jobsnamespace
 
 from tests.conftest import uploadable_file_object
 
-def test_parse_with_existing_uploaded_file(#pylint: disable=[too-many-arguments]
+def test_parse_with_existing_uploaded_file(
+        #pylint: disable=[too-many-arguments,too-many-positional-arguments]
         client,
         db_url,
         redis_url,