File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -737,6 +737,26 @@ def test_requirements_file_respects_configuration(tmpdir):
737
737
assert build .requirements_file == 'requirements.txt'
738
738
739
739
740
+ def test_requirements_file_is_null (tmpdir ):
741
+ build = get_build_config (
742
+ {'requirements_file' : None },
743
+ get_env_config (),
744
+ source_file = str (tmpdir .join ('readthedocs.yml' )),
745
+ )
746
+ build .validate ()
747
+ assert build .requirements_file is None
748
+
749
+
750
+ def test_requirements_file_is_blank (tmpdir ):
751
+ build = get_build_config (
752
+ {'requirements_file' : '' },
753
+ get_env_config (),
754
+ source_file = str (tmpdir .join ('readthedocs.yml' )),
755
+ )
756
+ build .validate ()
757
+ assert build .requirements_file is None
758
+
759
+
740
760
def test_build_validate_calls_all_subvalidators (tmpdir ):
741
761
apply_fs (tmpdir , minimal_config )
742
762
build = BuildConfigV1 (
Original file line number Diff line number Diff line change @@ -33,6 +33,24 @@ def test_parse_single_config():
33
33
assert config [0 ]['base' ] == 'path'
34
34
35
35
36
+ def test_parse_null_value ():
37
+ buf = StringIO (u'base: null' )
38
+ config = parse (buf )
39
+ assert config [0 ]['base' ] is None
40
+
41
+
42
+ def test_parse_empty_value ():
43
+ buf = StringIO (u'base:' )
44
+ config = parse (buf )
45
+ assert config [0 ]['base' ] is None
46
+
47
+
48
+ def test_parse_empty_string_value ():
49
+ buf = StringIO (u'base: ""' )
50
+ config = parse (buf )
51
+ assert config [0 ]['base' ] is ''
52
+
53
+
36
54
def test_parse_empty_list ():
37
55
buf = StringIO (u'base: []' )
38
56
config = parse (buf )
You can’t perform that action at this time.
0 commit comments