Beispiel #1
0
 def test_ocrd_file_without_filegrp(self):
     with self.assertRaisesRegex(ValueError, "set fileGrp"):
         create_ocrd_file(None, ID='foo')
Beispiel #2
0
 def test_ocrd_file_without_id(self):
     with self.assertRaisesRegex(ValueError, "set ID"):
         create_ocrd_file('FOO')
Beispiel #3
0
def test_ocrd_file_without_id():
    with pytest.raises(ValueError) as val_err:
        create_ocrd_file('FOO')

    assert "set ID" in str(val_err.value)
Beispiel #4
0
def test_ocrd_file_without_filegrp():
    with pytest.raises(ValueError) as val_err:
        create_ocrd_file(None, ID='foo')
    assert "set fileGrp" in str(val_err.value)
Beispiel #5
0
 def test_make_file_id_simple(self):
     f = create_ocrd_file('MAX', ID="MAX_0012")
     self.assertEqual(make_file_id(f, 'FOO'), 'FOO_0012')