mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-21 05:48:11 +08:00
Limit pytest ignore warning to only one specific warning
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
[pytest]
|
||||
filterwarnings =
|
||||
ignore::UserWarning
|
||||
@@ -51,4 +51,3 @@ class EndPoints(unittest.TestCase):
|
||||
url = "{base}{endpoint}".format(base=self.url_base, endpoint="diffexpression")
|
||||
result = self.session.post(url, data=json.dumps({"celllist1": ["AAACATACAACCAC-1", "AACCGATGGTCATG-1"], "celllist2": ["CCGATAGACCTAAG-1", "GGTGGAGAAGTAGA-1"]}), headers={'content-type': 'application/json'})
|
||||
assert result.status_code == 200
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import unittest
|
||||
import pytest
|
||||
|
||||
from server.app.scanpy_engine.scanpy_engine import ScanpyEngine
|
||||
|
||||
@@ -19,9 +20,11 @@ class UtilTest(unittest.TestCase):
|
||||
self.assertIn("name", self.data.data.var)
|
||||
self.assertEqual(list(self.data.data.var.index), list(range(1838)))
|
||||
|
||||
@pytest.mark.filterwarnings("ignore:Scanpy data matrix")
|
||||
def test_data_type(self):
|
||||
self.data.data.X = self.data.data.X.astype("float64")
|
||||
self.assertWarns(UserWarning, self.data._validatate_data_types())
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user