[PATCH eac] remove noqa in tests and auto pep8 compliancy

Guillaume Vandevelde guillaume.vandevelde at logilab.fr
Mon Aug 12 16:20:23 CEST 2019


# HG changeset patch
# User Guillaume Vandevelde <gvandevelde at logilab.fr>
# Date 1565615025 -7200
#      Mon Aug 12 15:03:45 2019 +0200
# Node ID e0a1b6871316311ad9d774c0a5302e60c57d4591
# Parent  0b61fbb4f0a7995c7dcc5adeb80d497a67099b05
# Available At http://hg.logilab.org/review/cubes/eac
#              hg pull http://hg.logilab.org/review/cubes/eac -r e0a1b6871316
remove noqa in tests and auto pep8 compliancy

diff -r 0b61fbb4f0a7 -r e0a1b6871316 test/test_dataimport.py
--- a/test/test_dataimport.py	Tue Jul 30 17:31:37 2019 +0200
+++ b/test/test_dataimport.py	Mon Aug 12 15:03:45 2019 +0200
@@ -91,20 +91,20 @@
               'start_date': set([datetime.date(1800, 1, 1)]),
               'end_date': set([datetime.date(2099, 1, 1)]),
               'agent_kind': set(['agentkind/authority']),
-              'record_id': set(['FRAD033_EAC_00001']),
-             },
-            ),
+              'record_id': set(['FRAD033_EAC_00001'])
+              },
+             ),
             ('EACOtherRecordId', _gen_extid(),
              {'eac_other_record_id_of': set(['FRAD033_EAC_00001']),
               'value': set([u'1234']),
-             },
-            ),
+              },
+             ),
             ('EACOtherRecordId', _gen_extid(),
              {'eac_other_record_id_of': set(['FRAD033_EAC_00001']),
               'value': set([u'ABCD']),
               'local_type': set([u'letters']),
-             },
-            ),
+              },
+             ),
             ('EACSource', _gen_extid(),
              {'source_agent': set(['FRAD033_EAC_00001']),
               'title': set([u'1. Ouvrages imprimés...']),
@@ -116,8 +116,8 @@
              {'source_agent': set(['FRAD033_EAC_00001']),
               'url': set([u'http://archives.gironde.fr']),
               'title': set([u'Site des Archives départementales de la Gironde']),
-             },
-            ),
+              },
+             ),
             ('Activity', _gen_extid(),
              {'type': set([u'create']),
               'generated': set(['FRAD033_EAC_00001']),
@@ -125,16 +125,16 @@
               'end': set([datetime.datetime(2013, 4, 24, 5, 34, 41)]),
               'description': set([u'bla bla']),
               'description_format': set([u'text/plain']),
-             },
-            ),
+              },
+             ),
             ('Activity', _gen_extid(),
              {'generated': set(['FRAD033_EAC_00001']),
               'type': set([u'modify']),
               'start': set([datetime.datetime(2015, 1, 15, 7, 16, 33)]),
               'end': set([datetime.datetime(2015, 1, 15, 7, 16, 33)]),
               'agent': set([u'Delphine Jamet'])
-             },
-            ),
+              },
+             ),
             ('Convention', _gen_extid(),
              {'convention_of': ['FRAD033_EAC_00001'],
               'abbrev': set([u'ISAAR(CPF)']),
@@ -145,12 +145,12 @@
                                   u'xmlns:xlink="http://www.w3.org/1999/xlink">Norme '
                                   u'ISAAR(CPF) du Conseil international des archives, '
                                   u'2e \xe9dition, 1996.</p>']),
-             },
-            ),
+              },
+             ),
             ('Citation', _gen_extid(),
              {'uri': set([u'http://www.ica.org']),
-             },
-            ),
+              },
+             ),
             ('Convention', _gen_extid(),
              {'convention_of': ['FRAD033_EAC_00001'],
               'description_format': set([u'text/html']),
@@ -160,8 +160,8 @@
                                   u'NF Z 44-060, octobre 1983, Catalogue '
                                   u'd\u2019auteurs et d\u2019anonymes : forme et\n          '
                                   u'structure des vedettes des collectivit\xe9s auteurs.</p>']),
-             },
-            ),
+              },
+             ),
             ('Convention', _gen_extid(),
              {'convention_of': ['FRAD033_EAC_00001'],
               'description_format': set([u'text/html']),
@@ -172,49 +172,49 @@
                                   u'd\u2019\xe9change -- \xc9change\n          '
                                   u'd\u2019information -- Repr\xe9sentation de la date et '
                                   u'de l\u2019heure.</p>']),
-             },
-            ),
+              },
+             ),
             ('AgentKind', 'agentkind/authority',
              {'name': set([u'authority'])},
-            ),
+             ),
             ('NameEntry', _gen_extid(),
              {'parts': set([u'Gironde, Conseil général']),
               'form_variant': set([u'authorized']),
               'name_entry_for': set(['FRAD033_EAC_00001']),
-             },
-            ),
+              },
+             ),
             ('NameEntry', _gen_extid(),
              {'parts': set([u'CG33']),
               'form_variant': set([u'alternative']),
               'name_entry_for': set(['FRAD033_EAC_00001']),
-             },
-            ),
+              },
+             ),
             ('PostalAddress', _gen_extid(),
              {'street': set([u'1 Esplanade Charles de Gaulle']),
               'postalcode': set([u'33074']),
               'city': set([u' Bordeaux Cedex']),
-             },
-            ),
+              },
+             ),
             ('AgentPlace', _gen_extid(),
              {'name': set([u'Bordeaux (Gironde, France)']),
               'role': set([u'siege']),
               'place_agent': set(['FRAD033_EAC_00001']),
               'place_address': set(['13']),
               'equivalent_concept': set(['http://catalogue.bnf.fr/ark:/12148/cb152418385']),
-             },
-            ),
+              },
+             ),
             ('AgentPlace', _gen_extid(),
              {'name': set([u'Toulouse (France)']),
               'place_agent': set(['FRAD033_EAC_00001']),
               'role': set([u'domicile']),
-             },
-            ),
+              },
+             ),
             ('AgentPlace', _gen_extid(),
              {'name': set([u'Lit']),
               'place_agent': set(['FRAD033_EAC_00001']),
               'role': set([u'dodo']),
-             },
-            ),
+              },
+             ),
             ('LegalStatus', _gen_extid(),
              {'term': set([u'Collectivité territoriale']),
               'start_date': set([datetime.date(1234, 1, 1)]),
@@ -222,50 +222,50 @@
               'description': set([u'Description du statut']),
               'description_format': set([u'text/plain']),
               'legal_status_agent': set(['FRAD033_EAC_00001']),
-             },
-            ),
+              },
+             ),
             ('Mandate', _gen_extid(),
              {'term': set([u'1. Constitutions françaises']),
               'description': set([u'Description du mandat']),
               'description_format': set([u'text/plain']),
               'mandate_agent': set(['FRAD033_EAC_00001']),
-             },
-            ),
+              },
+             ),
             ('History', _gen_extid(),
              {'abstract': set([u'Test of an abstract element']),
               'text': set(["\n".join((
-                     u'<p xmlns="urn:isbn:1-931666-33-4" '
-                     u'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" '
-                     u'xmlns:xlink="http://www.w3.org/1999/xlink">{0}</p>'
-                  ).format(text) for text in [u"La loi du 22 décembre 1789, en divisant ...",
-                                              u"L'inspecteur Canardo"])
+                  u'<p xmlns="urn:isbn:1-931666-33-4" '
+                  u'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" '
+                  u'xmlns:xlink="http://www.w3.org/1999/xlink">{0}</p>'
+              ).format(text) for text in [u"La loi du 22 décembre 1789, en divisant ...",
+                                          u"L'inspecteur Canardo"])
               ]),
               'text_format': set([u'text/html']),
               'history_agent': set(['FRAD033_EAC_00001']),
               'has_citation': set(['20', '21']),
               'has_event': set(['22', '23']),
-             },
-            ),
+              },
+             ),
             ('Citation', _gen_extid(),
              {'uri': set(['http://www.assemblee-nationale.fr/histoire/images-decentralisation/'
                           'decentralisation/loi-du-22-decembre-1789-.pdf'])},
-            ),
+             ),
             ('Citation', _gen_extid(),
              {'uri': set(['http://pifgadget']), 'note': set(['Voir aussi pifgadget'])},
-            ),
+             ),
             ('HistoricalEvent', _gen_extid(),
              {'event': [u'Left Mer and moved to the mainland.\n\t      '
                         u'Worked at various jobs including canecutter\n\t      '
-                        u'and railway labourer.\n\t      '], # noqa
+                        u'and railway labourer.\n\t      '],
               'end_date': set([datetime.date(1957, 1, 1)]),
               'start_date': set([datetime.date(1957, 1, 1)])}
-            ),
+             ),
             ('HistoricalEvent', _gen_extid(),
              {'event': set([u'Union representative, Townsville-\n\t      '
                             u'Mount Isa rail construction project.\n\t      ']),
               'end_date': set([datetime.date(1961, 1, 1)]),
               'start_date': set([datetime.date(1960, 1, 1)])}
-            ),
+             ),
             ('Structure', _gen_extid(),
              {'description': set([u'<p xmlns="urn:isbn:1-931666-33-4" '
                                   u'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" '
@@ -273,8 +273,8 @@
                                   u'ses missions ...</p>']),
               'description_format': set([u'text/html']),
               'structure_agent': set(['FRAD033_EAC_00001']),
-             },
-            ),
+              },
+             ),
             ('AgentFunction', _gen_extid(),
              {'description': set([u'<p xmlns="urn:isbn:1-931666-33-4" '
                                   u'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" '
@@ -282,8 +282,8 @@
                                   u'domaines de compétence...</p>']),
               'description_format': set([u'text/html']),
               'function_agent': set(['FRAD033_EAC_00001']),
-             },
-            ),
+              },
+             ),
             ('AgentFunction', _gen_extid(),
              {'name': set([u'action sociale']),
               'function_agent': set(['FRAD033_EAC_00001']),
@@ -295,15 +295,15 @@
               'equivalent_concept': set([
                   u'http://data.culture.fr/thesaurus/page/ark:/67717/T1-200'
               ]),
-             },
-            ),
+              },
+             ),
             ('AgentFunction', _gen_extid(),
              {'name': set([u'environnement']),
               'function_agent': set(['FRAD033_EAC_00001']),
               'equivalent_concept': set([
                   u'http://data.culture.fr/thesaurus/page/ark:/67717/T1-1074']),
-             },
-            ),
+              },
+             ),
             ('Occupation', _gen_extid(),
              {'term': set([u'Réunioniste']),
               'start_date': set([datetime.date(1987, 1, 1)]),
@@ -313,12 +313,12 @@
               'occupation_agent': set(['FRAD033_EAC_00001']),
               'has_citation': set(['29']),
               'equivalent_concept': set(['http://pifgadget.com']),
-             },
-            ),
+              },
+             ),
             ('Citation', _gen_extid(),
              {'note': set([u'la bible']),
-             },
-            ),
+              },
+             ),
             ('GeneralContext', _gen_extid(),
              {'content': set([u'<p xmlns="urn:isbn:1-931666-33-4" '
                               u'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" '
@@ -327,16 +327,16 @@
               'has_citation': set(['31']),
               'general_context_of': set(['FRAD033_EAC_00001']),
               }
-            ),
+             ),
             ('Citation', _gen_extid(),
              {'note': set([u'it\'s well known']),
-             },
-            ),
+              },
+             ),
             ('ExternalUri', 'CG33-DIRADSJ',
              {'uri': set([u'CG33-DIRADSJ']),
               'cwuri': set([u'CG33-DIRADSJ']),
-             },
-            ),
+              },
+             ),
             ('HierarchicalRelation', _gen_extid(),
              {'start_date': set([datetime.date(2008, 1, 1)]),
               'end_date': set([datetime.date(2099, 1, 1)]),
@@ -346,39 +346,42 @@
               'description_format': set([u'text/plain']),
               'hierarchical_parent': set(['CG33-DIRADSJ']),
               'hierarchical_child': set(['FRAD033_EAC_00001']),
-             },
-            ),
+              },
+             ),
             ('ExternalUri', 'whatever',
              {'uri': set([u'whatever']),
               'cwuri': set([u'whatever']),
-             },
-            ),
+              },
+             ),
             ('ExternalUri', '/dev/null',
              {'uri': set([u'/dev/null']),
               'cwuri': set([u'/dev/null']),
-             },
-            ),
+              },
+             ),
             ('ChronologicalRelation', _gen_extid(),
              {'chronological_predecessor': set(['whatever']),
               'chronological_successor': set(['FRAD033_EAC_00001']),
               'start_date': set([datetime.date(1917, 1, 1)]),
               'end_date': set([datetime.date(2009, 1, 1)]),
               'entry': set([u'CG32']),
-             },
-            ),
+              },
+             ),
             ('ChronologicalRelation', _gen_extid(),
              {'chronological_predecessor': set(['FRAD033_EAC_00001']),
               'chronological_successor': set(['/dev/null']),
               'start_date': set([datetime.date(2042, 1, 1)]),
-              'xml_wrap': set(['<gloups xmlns="urn:isbn:1-931666-33-4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">hips</gloups>']),  # noqa
+              'xml_wrap': set(['<gloups xmlns="urn:isbn:1-931666-33-4"'
+                               u' xmlns:xsi="http://www.w3.org/2001/XML'
+                               u'Schema-instance" xmlns:xlink="http://'
+                               u'www.w3.org/1999/xlink">hips</gloups>']),
               'entry': set([u'Trash']),
-             },
-            ),
+              },
+             ),
             ('AssociationRelation', _gen_extid(),
              {'association_from': set(['FRAD033_EAC_00001']),
               'association_to': set(['agent-x']),
-             },
-            ),
+              },
+             ),
             ('EACResourceRelation', _gen_extid(),
              {'agent_role': set([u'creatorOf']),
               'resource_role': set([u'Fonds d\'archives']),
@@ -387,9 +390,12 @@
               'resource_relation_agent': set(['FRAD033_EAC_00001']),
               'start_date': set([datetime.date(1673, 1, 1)]),
               'end_date': set([datetime.date(1963, 1, 1)]),
-              'xml_wrap': set(['<he xmlns="urn:isbn:1-931666-33-4" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">joe</he>']),  # noqa
-             },
-            ),
+              'xml_wrap': set(['<he xmlns="urn:isbn:1-931666-33-4" '
+                               u'xmlns:xlink="http://www.w3.org/1999'
+                               u'/xlink" xmlns:xsi="http://www.w3.org'
+                               u'/2001/XMLSchema-instance">joe</he>'])
+              },
+             ),
             ('EACFunctionRelation', _gen_extid(),
              {'description': set([u'<p xmlns="urn:isbn:1-931666-33-4" xmlns:xsi="http:/'
                                   '/www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http:'
@@ -417,8 +423,8 @@
                                  u" ('{http://www.w3.org/1999/xlink}arcrole',"
                                  u" 'http://test_arcrole.lol.com'), ('{http://www.w3."
                                  u"org/1999/xlink}role', 'http://test_role.lmao.com')]"])
-             },
-            ),
+              },
+             ),
             ('EACFunctionRelation', _gen_extid(),
              {'function_relation_function': set([u'FRAD033_IR_N']),
               'function_relation_agent': set([u'FRAD033_EAC_00001']),
@@ -433,8 +439,8 @@
               'description_format': set([u'text/html']),
               'relation_entry': set([u'Establishment and abolishment\n\tof schools\n\t']),
               'start_date': set([datetime.date(1922, 1, 1)])
-             },
-            ),
+              },
+             ),
             ('EACFunctionRelation', _gen_extid(),
              {'function_relation_agent': set([u'FRAD033_EAC_00001']),
               'description': set([u'<p xmlns="urn:isbn:1-931666-33-4" '
@@ -447,8 +453,8 @@
               'description_format': set([u'text/html']),
               'relation_entry': set([u'Some relation entry\n          ']),
               'start_date': set([datetime.date(1922, 1, 1)])
-             },
-            ),
+              },
+             ),
             ('EACFunctionRelation', _gen_extid(),
              {'function_relation_agent': set([u'FRAD033_EAC_00001']),
               'description': set([u'<p xmlns="urn:isbn:1-931666-33-4" '
@@ -461,39 +467,39 @@
               'description_format': set([u'text/html']),
               'relation_entry': set([u'Some relation entry\n          ']),
               'start_date': set([datetime.date(1922, 1, 1)])
-             },
-            ),
+              },
+             ),
             ('ExternalUri', 'ONLY_XLINK',
              {'uri': set([u'ONLY_XLINK']),
               'cwuri': set([u'ONLY_XLINK'])},
-            ),
+             ),
             ('ExternalUri', 'FRAD033_IR_N',
              {'uri': set([u'FRAD033_IR_N']),
               'cwuri': set([u'FRAD033_IR_N'])},
-            ),
+             ),
             ('ExternalUri', 'http://gael.gironde.fr/ead.html?id=FRAD033_IR_N',
              {'uri': set([u'http://gael.gironde.fr/ead.html?id=FRAD033_IR_N']),
               'cwuri': set([u'http://gael.gironde.fr/ead.html?id=FRAD033_IR_N'])},
-            ),
+             ),
             ('ExternalUri', 'agent-x',
              {'uri': set([u'agent-x']), 'cwuri': set([u'agent-x'])},
-            ),
+             ),
             ('ExternalUri', 'http://data.culture.fr/thesaurus/page/ark:/67717/T1-200',
              {'uri': set([u'http://data.culture.fr/thesaurus/page/ark:/67717/T1-200']),
               'cwuri': set([u'http://data.culture.fr/thesaurus/page/ark:/67717/T1-200'])},
-            ),
+             ),
             ('ExternalUri', 'http://data.culture.fr/thesaurus/page/ark:/67717/T1-1074',
              {'uri': set([u'http://data.culture.fr/thesaurus/page/ark:/67717/T1-1074']),
               'cwuri': set([u'http://data.culture.fr/thesaurus/page/ark:/67717/T1-1074'])},
-            ),
+             ),
             ('ExternalUri', 'http://catalogue.bnf.fr/ark:/12148/cb152418385',
              {'uri': set([u'http://catalogue.bnf.fr/ark:/12148/cb152418385']),
               'cwuri': set([u'http://catalogue.bnf.fr/ark:/12148/cb152418385'])},
-            ),
+             ),
             ('ExternalUri', 'http://pifgadget.com',
              {'uri': set([u'http://pifgadget.com']),
               'cwuri': set([u'http://pifgadget.com'])},
-            ),
+             ),
         ]
         expected = [ExtEntity(*vals) for vals in expected]
         fpath = self.datapath('FRAD033_EAC_00001_simplified.xml')


More information about the saem-devel mailing list