@@ -0,0 +1,509 @@
+'''Test that spurious 'extra_labels' aren't created when initializing NER.'''%0Aimport pytest%0Afrom ... import blank%0A%0A@pytest.mark.xfail%0Adef test_issue2179():%0A    nlp = blank('it')%0A    ner = nlp.create_pipe('ner')%0A    ner.add_label('CITIZENSHIP')%0A    nlp.add_pipe(ner)%0A    nlp.begin_training()%0A    nlp2 = blank('it')%0A    nlp2.add_pipe(nlp2.create_pipe('ner'))%0A    nlp2.from_bytes(nlp.to_bytes())%0A    assert 'extra_labels' not in nlp2.get_pipe('ner').cfg%0A    assert nlp2.get_pipe('ner').labels == %5B'CITIZENSHIP'%5D%0A

Add regression test for issue 2179