mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Remove `unittest.main()` calls
This commit is contained in:
@@ -1421,7 +1421,3 @@ class TestDynamicToolDestination(unittest.TestCase):
|
||||
assert dt.bytes_to_str("\t\t1000000") == "976.56 KB"
|
||||
assert dt.bytes_to_str("1000000000\n") == "953.67 MB"
|
||||
assert dt.bytes_to_str(1024, "fda") == "1.00 KB"
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
@@ -118,9 +118,3 @@ class CreatesCollectionsMixin:
|
||||
# src = 'ldda'#?
|
||||
identifier_list.append(dict(src=src, name=element.name, id=element.id))
|
||||
return identifier_list
|
||||
|
||||
|
||||
# =============================================================================
|
||||
if __name__ == "__main__":
|
||||
# or more generally, nosetests test_resourcemanagers.py -s -v
|
||||
unittest.main()
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
"""
|
||||
"""
|
||||
import unittest
|
||||
|
||||
from galaxy import model
|
||||
from galaxy.managers.collections import DatasetCollectionManager
|
||||
from galaxy.managers.datasets import DatasetManager
|
||||
@@ -118,9 +116,3 @@ class DatasetCollectionManagerTestCase(BaseTestCase, CreatesCollectionsMixin):
|
||||
# self.log("should be able to set deleted")
|
||||
# self.log("should be able to set visible")
|
||||
# self.log("should be able to set tags")
|
||||
|
||||
|
||||
# =============================================================================
|
||||
if __name__ == "__main__":
|
||||
# or more generally, nosetests test_resourcemanagers.py -s -v
|
||||
unittest.main()
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
"""
|
||||
"""
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
import sqlalchemy
|
||||
@@ -317,8 +316,3 @@ class DatasetSerializerTestCase(BaseTestCase):
|
||||
# DatasetAssociationSerializer,
|
||||
# DatasetAssociationDeserializer,
|
||||
# DatasetAssociationFilterParser
|
||||
|
||||
# =============================================================================
|
||||
if __name__ == "__main__":
|
||||
# or more generally, nosetests test_resourcemanagers.py -s -v
|
||||
unittest.main()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
import sqlalchemy
|
||||
@@ -684,9 +683,3 @@ class HDAFilterParserTestCase(HDATestCase):
|
||||
|
||||
# def test_data_type_filters( self ):
|
||||
# pass
|
||||
|
||||
|
||||
# =============================================================================
|
||||
if __name__ == "__main__":
|
||||
# or more generally, nosetests test_resourcemanagers.py -s -v
|
||||
unittest.main()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
from galaxy.managers import (
|
||||
@@ -102,9 +101,3 @@ class HDCASerializerTestCase(HDCATestCase):
|
||||
self.log("should be able to use keys on their own")
|
||||
serialized = serializer.serialize_to_view(item, keys=only_keys)
|
||||
self.assertKeys(serialized, only_keys)
|
||||
|
||||
|
||||
# =============================================================================
|
||||
if __name__ == "__main__":
|
||||
# or more generally, nosetests test_resourcemanagers.py -s -v
|
||||
unittest.main()
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
"""
|
||||
import datetime
|
||||
import random
|
||||
import unittest
|
||||
|
||||
from sqlalchemy import (
|
||||
column,
|
||||
@@ -373,8 +372,3 @@ class HistoryContentsFilterParserTestCase(HistoryAsContainerBaseTestCase):
|
||||
self.log("should error if wrong milliseconds format is used")
|
||||
self.assertRaises(ValueError, self.filter_parser.parse_date, "2009-02-13 18:13:00.")
|
||||
self.assertRaises(ValueError, self.filter_parser.parse_date, "2009-02-13 18:13:00.1234567")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# or more generally, nosetests test_resourcemanagers.py -s -v
|
||||
unittest.main()
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
"""
|
||||
"""
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
import sqlalchemy
|
||||
@@ -940,9 +939,3 @@ class HistoryFiltersTestCase(BaseTestCase):
|
||||
# TODO: eq, ge, le
|
||||
# def test_ratings( self ):
|
||||
# pass
|
||||
|
||||
|
||||
# =============================================================================
|
||||
if __name__ == "__main__":
|
||||
# or more generally, nosetests test_resourcemanagers.py -s -v
|
||||
unittest.main()
|
||||
|
||||
@@ -3,7 +3,6 @@ User Manager testing.
|
||||
|
||||
Executable directly using: python -m test.unit.managers.test_UserManager
|
||||
"""
|
||||
import unittest
|
||||
from datetime import datetime
|
||||
|
||||
from sqlalchemy import desc
|
||||
@@ -375,8 +374,3 @@ class AdminUserFilterParserTestCase(BaseTestCase):
|
||||
self.assertORMFilter(self.filter_parser.parse_filter("active", "eq", True))
|
||||
self.assertORMFilter(self.filter_parser.parse_filter("disk_usage", "le", 500000.00))
|
||||
self.assertORMFilter(self.filter_parser.parse_filter("disk_usage", "ge", 500000.00))
|
||||
|
||||
|
||||
# =============================================================================
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
"""
|
||||
Test lib/galaxy/visualization/plugins/plugin.
|
||||
"""
|
||||
import unittest
|
||||
|
||||
from galaxy.app_unittest_utils import galaxy_mock
|
||||
from galaxy.util import clean_multiline_string
|
||||
from galaxy.visualization.plugins import (
|
||||
@@ -158,6 +156,3 @@ class VisualizationsPlugin_TestCase(VisualizationsBase_TestCase):
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# TODO: config parser tests (in separate file)
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Test lib/galaxy/visualization/plugins/registry.
|
||||
"""
|
||||
import os
|
||||
import unittest
|
||||
|
||||
from galaxy.app_unittest_utils import galaxy_mock
|
||||
from galaxy.util import (
|
||||
@@ -178,6 +177,3 @@ class VisualizationsRegistry_TestCase(VisualizationsBase_TestCase):
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# TODO: config parser tests (in separate file)
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
@@ -395,7 +395,3 @@ class TempFileCache:
|
||||
log.debug("unlinking tmpfile: %s", tmpfile)
|
||||
os.unlink(tmpfile)
|
||||
self._content_dict = {}
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
@@ -3,7 +3,6 @@ Unit tests for base DataProviders.
|
||||
.. seealso:: galaxy.datatypes.dataproviders.base
|
||||
"""
|
||||
import logging
|
||||
import unittest
|
||||
from typing import Type
|
||||
|
||||
from galaxy.datatypes.dataproviders import (
|
||||
@@ -310,7 +309,3 @@ class Test_BlockDataProvider(test_base_dataproviders.Test_FilteredDataProvider):
|
||||
)
|
||||
assert data == [{"id": "One", "seq": "ABCD"}, {"id": "Two", "seq": "ABCDEFGH"}]
|
||||
self.assertCounters(provider, 2, 2, 2)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
@@ -104,7 +104,3 @@ class GalaxyWebTransaction_Headers_TestCase(unittest.TestCase):
|
||||
trans.request.headers["Origin"] = "http://öbb.at"
|
||||
trans.set_cors_headers()
|
||||
assert trans.response.headers["access-control-allow-origin"] == "http://öbb.at"
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user