File tree 2 files changed +38
-0
lines changed
2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -729,6 +729,26 @@ def test_requirements_file_respects_configuration(tmpdir):
729
729
assert build .python .requirements == 'requirements.txt'
730
730
731
731
732
+ def test_requirements_file_is_null (tmpdir ):
733
+ build = get_build_config (
734
+ {'requirements_file' : None },
735
+ get_env_config (),
736
+ source_file = str (tmpdir .join ('readthedocs.yml' )),
737
+ )
738
+ build .validate ()
739
+ assert build .requirements_file is None
740
+
741
+
742
+ def test_requirements_file_is_blank (tmpdir ):
743
+ build = get_build_config (
744
+ {'requirements_file' : '' },
745
+ get_env_config (),
746
+ source_file = str (tmpdir .join ('readthedocs.yml' )),
747
+ )
748
+ build .validate ()
749
+ assert build .requirements_file is None
750
+
751
+
732
752
def test_build_validate_calls_all_subvalidators (tmpdir ):
733
753
apply_fs (tmpdir , minimal_config )
734
754
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' ] == ''
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