@@ -777,28 +777,8 @@ def test_doctest_skip(testdir):
777777 testdir .inline_run (p , '--doctest-plus' , '--doctest-rst' ).assertoutcome (skipped = 1 )
778778
779779
780- def test_remote_data_on (testdir ):
781- testdir .makeini (
782- """
783- [pytest]
784- doctestplus = enabled
785- """ )
786-
787- p = testdir .makefile (
788- '.rst' ,
789- """
790- # This test should pass
791- .. doctest-remote-data::
792-
793- >>> 1 + 1
794- 2
795- """
796- )
797- testdir .inline_run (p , '--doctest-plus' , '--doctest-rst' ,
798- '--remote-data' ).assertoutcome (passed = 1 )
799-
800-
801- def test_remote_data_off (testdir ):
780+ # We repeat all testst including remote data with and without it opted in
781+ def test_remote_data_url (testdir ):
802782 testdir .makeini (
803783 """
804784 [pytest]
@@ -817,6 +797,7 @@ def test_remote_data_off(testdir):
817797 ... remote.read() # doctest: +IGNORE_OUTPUT
818798 """
819799 )
800+ testdir .inline_run (p , '--doctest-plus' , '--doctest-rst' , '--remote-data' ).assertoutcome (passed = 1 )
820801 testdir .inline_run (p , '--doctest-plus' , '--doctest-rst' ).assertoutcome (skipped = 1 )
821802
822803
@@ -838,6 +819,7 @@ def test_remote_data_float_cmp(testdir):
838819 0.333333
839820 """
840821 )
822+ testdir .inline_run (p , '--doctest-plus' , '--doctest-rst' , '--remote-data' ).assertoutcome (passed = 1 )
841823 testdir .inline_run (p , '--doctest-plus' , '--doctest-rst' ).assertoutcome (skipped = 1 )
842824
843825
@@ -861,6 +843,7 @@ def test_remote_data_ignore_whitespace(testdir):
861843 foo
862844 """
863845 )
846+ testdir .inline_run (p , '--doctest-plus' , '--doctest-rst' , '--remote-data' ).assertoutcome (passed = 1 )
864847 testdir .inline_run (p , '--doctest-plus' , '--doctest-rst' ).assertoutcome (skipped = 1 )
865848
866849
@@ -875,15 +858,16 @@ def test_remote_data_ellipsis(testdir):
875858 p = testdir .makefile (
876859 '.rst' ,
877860 """
878- #This test should be skipped when remote data is not requested, and should
879- #pass when remote data is requested
861+ # This test should be skipped when remote data is not requested, and should
862+ # pass when remote data is requested
880863 .. doctest-remote-data::
881864
882865 >>> a = "freedom at last"
883866 >>> print(a)
884867 freedom ...
885868 """
886869 )
870+ testdir .inline_run (p , '--doctest-plus' , '--doctest-rst' , '--remote-data' ).assertoutcome (passed = 1 )
887871 testdir .inline_run (p , '--doctest-plus' , '--doctest-rst' ).assertoutcome (skipped = 1 )
888872
889873
@@ -897,16 +881,17 @@ def test_remote_data_requires(testdir):
897881 p = testdir .makefile (
898882 '.rst' ,
899883 """
900- #This test should be skipped when remote data is not requested.
901- #It should also be skipped instead of failing when remote data is requested because
902- #the module required does not exist
884+ # This test should be skipped when remote data is not requested.
885+ # It should also be skipped instead of failing when remote data is requested because
886+ # the module required does not exist
903887 .. doctest-remote-data::
904888 .. doctest-requires:: does-not-exist
905889
906890 >>> 1 + 1
907891 3
908892 """
909893 )
894+ testdir .inline_run (p , '--doctest-plus' , '--doctest-rst' , '--remote-data' ).assertoutcome (skipped = 1 )
910895 testdir .inline_run (p , '--doctest-plus' , '--doctest-rst' ).assertoutcome (skipped = 1 )
911896
912897
@@ -920,11 +905,12 @@ def test_remote_data_ignore_warnings(testdir):
920905 p = testdir .makefile (
921906 '.rst' ,
922907 """
923- #This test should be skipped if remote data is not requested.
908+ # This test should be skipped if remote data is not requested.
924909 .. doctest-remote-data::
925910
926911 >>> import warnings
927912 >>> warnings.warn('A warning occurred', UserWarning) # doctest: +IGNORE_WARNINGS
928913 """
929914 )
915+ testdir .inline_run (p , '--doctest-plus' , '--doctest-rst' , '--remote-data' ).assertoutcome (passed = 1 )
930916 testdir .inline_run (p , '--doctest-plus' , '--doctest-rst' ).assertoutcome (skipped = 1 )
0 commit comments