def test_get_resolved_values(): from datalad.tests.utils import _get_resolved_flavors flavors = ['networkish', 'local'] eq_(([] if dl_cfg.get('datalad.tests.nonetwork') else ['networkish']) + ['local'], _get_resolved_flavors(flavors)) with patch_config({'datalad.tests.nonetwork': '1'}): eq_(_get_resolved_flavors(flavors), ['local']) # and one more to see the exception being raised if nothing to teston @with_testrepos(flavors=['network']) def magical(): raise AssertionError("Must not be ran") assert_raises(SkipTest, magical)
def test_get_resolved_values(): from datalad.tests.utils import _get_resolved_flavors flavors = ['networkish', 'local'] eq_(([] if os.environ.get('DATALAD_TESTS_NONETWORK') else ['networkish']) + ['local'], _get_resolved_flavors(flavors)) with patch.dict('os.environ', {'DATALAD_TESTS_NONETWORK': '1'}): eq_(_get_resolved_flavors(flavors), ['local']) # and one more to see the exception being raised if nothing to teston @with_testrepos(flavors=['network']) def magical(): raise AssertionError("Must not be ran") assert_raises(SkipTest, magical)
def test_get_resolved_values(): from datalad.tests.utils import _get_resolved_flavors flavors = ['networkish', 'local'] eq_(([] if os.environ.get('DATALAD_TESTS_NONETWORK') else ['networkish']) + ['local'], _get_resolved_flavors(flavors)) with patch.dict('os.environ', {'DATALAD_TESTS_NONETWORK': '1'}): eq_(_get_resolved_flavors(flavors), ['local']) # and one more to see the exception being raised if nothing to teston @with_testrepos(flavors=['network']) def magical(): raise AssertionError("Must not be ran") assert_raises(SkipTest, magical)