예제 #1
0
def test_validate_one_format():
    with pytest.raises(JupytextFormatError):
        validate_one_format("py:percent")

    with pytest.raises(JupytextFormatError):
        validate_one_format({"extension": "py", "format_name": "invalid"})

    with pytest.raises(JupytextFormatError):
        validate_one_format({})

    with pytest.raises(JupytextFormatError):
        validate_one_format({"extension": ".py", "unknown_option": True})

    with pytest.raises(JupytextFormatError):
        validate_one_format({"extension": ".py", "comment_magics": "TRUE"})
예제 #2
0
def test_validate_one_format():
    with pytest.raises(JupytextFormatError):
        validate_one_format('py:percent')

    with pytest.raises(JupytextFormatError):
        validate_one_format({})

    with pytest.raises(JupytextFormatError):
        validate_one_format({'extension': '.py', 'unknown_option': True})

    with pytest.raises(JupytextFormatError):
        validate_one_format({'extension': '.py', 'comment_magics': 'TRUE'})