From b0462a1e808554c978ff17fa10555837fa4417be Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Tue, 18 May 2021 18:52:42 +0200 Subject: [PATCH] . is no more unvalable --- tests/test_option.py | 12 ++++++++++++ tiramisu/option/baseoption.py | 2 ++ 2 files changed, 14 insertions(+) diff --git a/tests/test_option.py b/tests/test_option.py index 17bf65e..16d3c9e 100644 --- a/tests/test_option.py +++ b/tests/test_option.py @@ -31,6 +31,18 @@ async def test_option_valid_name(): with pytest.raises(ValueError): SymLinkOption(1, i) i = SymLinkOption("test1", i) +# +# +#@pytest.mark.asyncio +#async def test_option_unvalid_name(): +# with pytest.raises(ValueError): +# IntOption('test.', '') +# with pytest.raises(ValueError): +# IntOption('test.val', '') +# with pytest.raises(ValueError): +# IntOption('.test', '') +# with pytest.raises(ValueError): +# OptionDescription('.test', '', []) @pytest.mark.asyncio diff --git a/tiramisu/option/baseoption.py b/tiramisu/option/baseoption.py index c4e51ee..c682634 100644 --- a/tiramisu/option/baseoption.py +++ b/tiramisu/option/baseoption.py @@ -40,6 +40,8 @@ submulti = 2 def valid_name(name): if not isinstance(name, str): return False +# if '.' in name: +# return False return True