mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-18 18:38:11 +08:00
fixes an issue with "cellxgene launch" which had a bad interaction between command line parameters and config file parameters. Now, the config files are applied first, followed by the parameters that were provided in the command line. There is also now a check that each of the config attributes is type checked.
15 lines
476 B
Python
15 lines
476 B
Python
import unittest
|
|
from server.common.app_config import AppConfig
|
|
|
|
# NOTE, there are more tests that should be written for AppConfig.
|
|
# this is just a start.
|
|
|
|
|
|
class AppConfigTest(unittest.TestCase):
|
|
def test_update(self):
|
|
c = AppConfig()
|
|
c.update(server__verbose=True, multi_dataset__dataroot="datadir")
|
|
|
|
v = c.changes_from_default()
|
|
self.assertCountEqual(v, [("server__verbose", True, False), ("multi_dataset__dataroot", "datadir", None)]),
|