mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-01 01:38:12 +08:00
remove options widget + launch on file selection (#839)
* remove options widget + launch on file selection * extend drop area width
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
import unittest
|
||||
|
||||
from server.gui.options_parser import parse_opt_string
|
||||
from server.utils.errors import OptionsError
|
||||
|
||||
default_opts = {'title': None, 'layout': (), 'obs_names': None, 'var_names': None, 'max_category_items': 1000,
|
||||
'diffexp_lfc_cutoff': 0.01}
|
||||
|
||||
|
||||
class UtilsTest(unittest.TestCase):
|
||||
|
||||
def test_empty_opts(self):
|
||||
result = parse_opt_string("")
|
||||
self.assertEqual(result, default_opts)
|
||||
|
||||
def test_one_opts(self):
|
||||
result = parse_opt_string("--title abcde")
|
||||
expected_opts = dict(default_opts)
|
||||
expected_opts["title"] = "abcde"
|
||||
self.assertEqual(result, expected_opts)
|
||||
|
||||
def test_malformed_opts(self):
|
||||
with self.assertRaises(OptionsError):
|
||||
parse_opt_string("--ewwwww lkafsjkl")
|
||||
|
||||
def test_complex_opts(self):
|
||||
result = parse_opt_string(
|
||||
"--title abcde --obs-names zzzzz --var-names 'xxx yyy' --max-category-items 234907 "
|
||||
"--diffexp-lfc-cutoff 0.00003847382")
|
||||
expected_opts = {'title': 'abcde', 'layout': (), 'obs_names': 'zzzzz', 'var_names': 'xxx yyy',
|
||||
'max_category_items': 234907, 'diffexp_lfc_cutoff': 3.847382e-05}
|
||||
self.assertEqual(result, expected_opts)
|
||||
Reference in New Issue
Block a user