コード例 #1
0
def test_rangeslider_equal_start_end_validation(caplog):
    start = 0
    end = 10
    s = mws.RangeSlider(start=start, end=end)
    #with caplog.at_level(logging.ERROR, logger='bokeh.core.validation.check'):
    with caplog.at_level(logging.ERROR):
        assert len(caplog.records) == 0
        s.end = 0
        check_integrity([s])
        assert len(caplog.records) == 1
コード例 #2
0
ファイル: test_slider.py プロジェクト: digitalsatori/Bokeh
def test_rangeslider_equal_start_end_validation(caplog):
    start = 0
    end = 10
    s = mws.RangeSlider(start=start, end=end)
    #with caplog.at_level(logging.ERROR, logger='bokeh.core.validation.check'):
    with caplog.at_level(logging.ERROR):
        assert len(caplog.records) == 0
        s.end = 0
        check_integrity([s])
        assert len(caplog.records) == 1
コード例 #3
0
ファイル: test_slider.py プロジェクト: zebulon2/bokeh
 def test_rangeslider_equal_start_end_validation(
         self, caplog: pytest.LogCaptureFixture) -> None:
     start = 0
     end = 10
     s = mws.RangeSlider(start=start, end=end)
     #with caplog.at_level(logging.ERROR, logger='bokeh.core.validation.check'):
     with caplog.at_level(logging.ERROR):
         assert len(caplog.records) == 0
         s.end = 0
         issues = check_integrity([s])
         process_validation_issues(issues)
         assert len(caplog.records) == 1