commit python-Faker for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-Faker for openSUSE:Factory checked in at 2021-08-31 19:55:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-Faker (Old) and /work/SRC/openSUSE:Factory/.python-Faker.new.1899 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-Faker" Tue Aug 31 19:55:13 2021 rev:26 rq:915040 version:8.12.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-Faker/python-Faker.changes 2021-08-16 10:17:08.222691466 +0200 +++ /work/SRC/openSUSE:Factory/.python-Faker.new.1899/python-Faker.changes 2021-08-31 19:56:10.997998882 +0200 @@ -1,0 +2,10 @@ +Mon Aug 30 11:18:00 UTC 2021 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com> + +- Update to 8.12.1 + * Add missing diacritics in ``fr_FR`` ``person`` provider. Thanks @laowantong. +- from version 8.12.0 + * Added non-geo numbers and services phones format for ``pt_BR``. Thanks @leogregianin. + * Add datetime formats in ``pt_BR``. Thanks @leogregianin. + * Add currency formats in ``pt_BR``. Thanks @leogregianin. + +------------------------------------------------------------------- Old: ---- Faker-8.11.0.tar.gz New: ---- Faker-8.12.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-Faker.spec ++++++ --- /var/tmp/diff_new_pack.CrR6Lw/_old 2021-08-31 19:56:11.565999593 +0200 +++ /var/tmp/diff_new_pack.CrR6Lw/_new 2021-08-31 19:56:11.569999598 +0200 @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python3-%{**}} %global skip_python2 1 Name: python-Faker -Version: 8.11.0 +Version: 8.12.1 Release: 0 Summary: Python package that generates fake data License: MIT ++++++ Faker-8.11.0.tar.gz -> Faker-8.12.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-8.11.0/CHANGELOG.md new/Faker-8.12.1/CHANGELOG.md --- old/Faker-8.11.0/CHANGELOG.md 2021-08-03 17:24:53.000000000 +0200 +++ new/Faker-8.12.1/CHANGELOG.md 2021-08-24 18:23:50.000000000 +0200 @@ -1,5 +1,15 @@ ## Changelog +### [v8.12.1 - 2021-08-24](https://github.com/joke2k/faker/compare/v8.12.0...v8.12.1) + +* Add missing diacritics in ``fr_FR`` ``person`` provider. Thanks @laowantong. + +### [v8.12.0 - 2021-08-20](https://github.com/joke2k/faker/compare/v8.11.0...v8.12.0) + +* Added non-geo numbers and services phones format for ``pt_BR``. Thanks @leogregianin. +* Add datetime formats in ``pt_BR``. Thanks @leogregianin. +* Add currency formats in ``pt_BR``. Thanks @leogregianin. + ### [v8.11.0 - 2021-08-03](https://github.com/joke2k/faker/compare/v8.10.3...v8.11.0) * Add ``nic_handle``. Thanks @pishchalnikov. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-8.11.0/CITATION.cff new/Faker-8.12.1/CITATION.cff --- old/Faker-8.11.0/CITATION.cff 1970-01-01 01:00:00.000000000 +0100 +++ new/Faker-8.12.1/CITATION.cff 2021-08-12 19:07:14.000000000 +0200 @@ -0,0 +1,9 @@ +authors: + - family-names: Faraglia + given-names: Daniele + - name: "Other Contributors" +cff-version: 1.2.0 +license: MIT +message: If you use this software, please cite it using these metadata. +repository-code: "https://github.com/joke2k/faker" +title: "Faker" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-8.11.0/Faker.egg-info/PKG-INFO new/Faker-8.12.1/Faker.egg-info/PKG-INFO --- old/Faker-8.11.0/Faker.egg-info/PKG-INFO 2021-08-03 17:25:20.000000000 +0200 +++ new/Faker-8.12.1/Faker.egg-info/PKG-INFO 2021-08-24 18:24:09.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: Faker -Version: 8.11.0 +Version: 8.12.1 Summary: Faker is a Python package that generates fake data for you. Home-page: https://github.com/joke2k/faker Author: joke2k diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-8.11.0/Faker.egg-info/SOURCES.txt new/Faker-8.12.1/Faker.egg-info/SOURCES.txt --- old/Faker-8.11.0/Faker.egg-info/SOURCES.txt 2021-08-03 17:25:20.000000000 +0200 +++ new/Faker-8.12.1/Faker.egg-info/SOURCES.txt 2021-08-24 18:24:09.000000000 +0200 @@ -1,4 +1,5 @@ CHANGELOG.md +CITATION.cff CONTRIBUTING.rst LICENSE.txt MANIFEST.in @@ -205,6 +206,7 @@ faker/providers/currency/fr_FR/__init__.py faker/providers/currency/it_IT/__init__.py faker/providers/currency/pl_PL/__init__.py +faker/providers/currency/pt_BR/__init__.py faker/providers/currency/ro_RO/__init__.py faker/providers/currency/ru_RU/__init__.py faker/providers/currency/sk_SK/__init__.py @@ -229,6 +231,7 @@ faker/providers/date_time/it_IT/__init__.py faker/providers/date_time/ko_KR/__init__.py faker/providers/date_time/pl_PL/__init__.py +faker/providers/date_time/pt_BR/__init__.py faker/providers/date_time/pt_PT/__init__.py faker/providers/date_time/ro_RO/__init__.py faker/providers/date_time/ru_RU/__init__.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-8.11.0/MANIFEST.in new/Faker-8.12.1/MANIFEST.in --- old/Faker-8.11.0/MANIFEST.in 2021-06-02 14:40:23.000000000 +0200 +++ new/Faker-8.12.1/MANIFEST.in 2021-08-12 19:07:49.000000000 +0200 @@ -4,6 +4,7 @@ include CHANGELOG.md include RELEASE_PROCESS.rst include VERSION +include CITATION.cff recursive-include tests *.json recursive-include tests *.py recursive-exclude faker/sphinx *.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-8.11.0/PKG-INFO new/Faker-8.12.1/PKG-INFO --- old/Faker-8.11.0/PKG-INFO 2021-08-03 17:25:22.424924000 +0200 +++ new/Faker-8.12.1/PKG-INFO 2021-08-24 18:24:10.629627200 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: Faker -Version: 8.11.0 +Version: 8.12.1 Summary: Faker is a Python package that generates fake data for you. Home-page: https://github.com/joke2k/faker Author: joke2k diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-8.11.0/VERSION new/Faker-8.12.1/VERSION --- old/Faker-8.11.0/VERSION 2021-08-03 17:25:04.000000000 +0200 +++ new/Faker-8.12.1/VERSION 2021-08-24 18:23:59.000000000 +0200 @@ -1 +1 @@ -8.11.0 +8.12.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-8.11.0/faker/__init__.py new/Faker-8.12.1/faker/__init__.py --- old/Faker-8.11.0/faker/__init__.py 2021-08-03 17:25:04.000000000 +0200 +++ new/Faker-8.12.1/faker/__init__.py 2021-08-24 18:23:59.000000000 +0200 @@ -2,6 +2,6 @@ from faker.generator import Generator from faker.proxy import Faker -VERSION = '8.11.0' +VERSION = '8.12.1' __all__ = ('Factory', 'Generator', 'Faker') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-8.11.0/faker/providers/currency/pt_BR/__init__.py new/Faker-8.12.1/faker/providers/currency/pt_BR/__init__.py --- old/Faker-8.11.0/faker/providers/currency/pt_BR/__init__.py 1970-01-01 01:00:00.000000000 +0100 +++ new/Faker-8.12.1/faker/providers/currency/pt_BR/__init__.py 2021-08-20 20:05:18.000000000 +0200 @@ -0,0 +1,9 @@ +from .. import Provider as CurrencyProvider + + +class Provider(CurrencyProvider): + + price_formats = ["#,##", "%#,##", "%##,##", "%.###,##", "%#.###,##"] + + def pricetag(self): + return ("R$" + self.numerify(self.random_element(self.price_formats))) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-8.11.0/faker/providers/date_time/pt_BR/__init__.py new/Faker-8.12.1/faker/providers/date_time/pt_BR/__init__.py --- old/Faker-8.11.0/faker/providers/date_time/pt_BR/__init__.py 1970-01-01 01:00:00.000000000 +0100 +++ new/Faker-8.12.1/faker/providers/date_time/pt_BR/__init__.py 2021-08-20 20:05:18.000000000 +0200 @@ -0,0 +1,37 @@ +from .. import Provider as DateTimeProvider + + +class Provider(DateTimeProvider): + + DAY_NAMES = { + "0": "domingo", + "1": "segunda-feira", + "2": "ter��a-feira", + "3": "quarta-feira", + "4": "quinta-feira", + "5": "sexta-feira", + "6": "s��bado", + } + + MONTH_NAMES = { + "01": "janeiro", + "02": "fevereiro", + "03": "mar��o", + "04": "abril", + "05": "maio", + "06": "junho", + "07": "julho", + "08": "agosto", + "09": "setembro", + "10": "outubro", + "11": "novembro", + "12": "dezembro", + } + + def day_of_week(self): + day = self.date("%w") + return self.DAY_NAMES[day] + + def month_name(self): + month = self.month() + return self.MONTH_NAMES[month] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-8.11.0/faker/providers/person/fr_FR/__init__.py new/Faker-8.12.1/faker/providers/person/fr_FR/__init__.py --- old/Faker-8.11.0/faker/providers/person/fr_FR/__init__.py 2020-01-14 19:13:54.000000000 +0100 +++ new/Faker-8.12.1/faker/providers/person/fr_FR/__init__.py 2021-08-24 18:22:29.000000000 +0200 @@ -208,7 +208,6 @@ 'Margot', 'Margaret', 'Maggie', - 'daisy', 'Marianne', 'Marie', 'Marine', @@ -259,41 +258,41 @@ last_names = ( 'Martin', 'Bernard', 'Thomas', 'Robert', 'Petit', 'Dubois', 'Richard', 'Garcia', 'Durand', 'Moreau', 'Lefebvre', 'Simon', 'Laurent', 'Michel', 'Leroy', 'Martinez', 'David', 'Fontaine', 'Da Silva', 'Morel', 'Fournier', - 'Dupont', 'Bertrand', 'Lambert', 'Rousseau', 'Girard', 'Roux', 'Vincent', 'Lefevre', 'Boyer', 'Lopez', 'Bonnet', - 'Andre', 'Francois', 'Mercier', 'Muller', 'Guerin', 'Legrand', 'Sanchez', 'Garnier', 'Chevalier', 'Faure', - 'Perez', 'Clement', 'Fernandez', 'Blanc', 'Robin', 'Morin', 'Gauthier', 'Pereira', 'Perrin', 'Roussel', 'Henry', - 'Duval', 'Gautier', 'Nicolas', 'Masson', 'Marie', 'Noel', 'Ferreira', 'Lemaire', 'Mathieu', 'Riviere', 'Denis', + 'Dupont', 'Bertrand', 'Lambert', 'Rousseau', 'Girard', 'Roux', 'Vincent', 'Lef��vre', 'Boyer', 'Lopez', 'Bonnet', + 'Andre', 'Fran��ois', 'Mercier', 'Muller', 'Gu��rin', 'Legrand', 'Sanchez', 'Garnier', 'Chevalier', 'Faure', + 'Perez', 'Cl��ment', 'Fernandez', 'Blanc', 'Robin', 'Morin', 'Gauthier', 'Pereira', 'Perrin', 'Roussel', 'Henry', + 'Duval', 'Gautier', 'Nicolas', 'Masson', 'Marie', 'No��l', 'Ferreira', 'Lemaire', 'Mathieu', 'Rivi��re', 'Denis', 'Marchand', 'Rodriguez', 'Dumont', 'Payet', 'Lucas', 'Dufour', 'Dos Santos', 'Joly', 'Blanchard', 'Meunier', - 'Rodrigues', 'Caron', 'Gerard', 'Fernandes', 'Brunet', 'Meyer', 'Barbier', 'Leroux', 'Renard', 'Goncalves', + 'Rodrigues', 'Caron', 'G��rard', 'Fernandes', 'Brunet', 'Meyer', 'Barbier', 'Leroux', 'Renard', 'Goncalves', 'Gaillard', 'Brun', 'Roy', 'Picard', 'Giraud', 'Roger', 'Schmitt', 'Colin', 'Arnaud', 'Vidal', 'Gonzalez', 'Lemoine', 'Roche', 'Aubert', 'Olivier', 'Leclercq', 'Pierre', 'Philippe', 'Bourgeois', 'Renaud', 'Martins', 'Leclerc', 'Guillaume', 'Lacroix', 'Lecomte', 'Benoit', 'Fabre', 'Carpentier', 'Vasseur', 'Louis', 'Hubert', 'Jean', 'Dumas', 'Rolland', 'Grondin', 'Rey', 'Huet', 'Gomez', 'Dupuis', 'Guillot', 'Berger', 'Moulin', 'Hoarau', 'Menard', 'Deschamps', 'Fleury', 'Adam', 'Boucher', 'Poirier', 'Bertin', 'Charles', 'Aubry', 'Da Costa', 'Royer', 'Dupuy', 'Maillard', 'Paris', 'Baron', 'Lopes', 'Guyot', 'Carre', 'Jacquet', 'Renault', - 'Herve', 'Charpentier', 'Klein', 'Cousin', 'Collet', 'Leger', 'Ribeiro', 'Hernandez', 'Bailly', 'Schneider', - 'Le Gall', 'Ruiz', 'Langlois', 'Bouvier', 'Gomes', 'Prevost', 'Julien', 'Lebrun', 'Breton', 'Germain', 'Millet', - 'Boulanger', 'Remy', 'Le Roux', 'Daniel', 'Marques', 'Maillot', 'Leblanc', 'Le Goff', 'Barre', 'Perrot', - 'Leveque', 'Marty', 'Benard', 'Monnier', 'Hamon', 'Pelletier', 'Alves', 'Etienne', 'Marchal', 'Poulain', - 'Tessier', 'Lemaitre', 'Guichard', 'Besson', 'Mallet', 'Hoareau', 'Gillet', 'Weber', 'Jacob', 'Collin', - 'Chevallier', 'Perrier', 'Michaud', 'Carlier', 'Delaunay', 'Chauvin', 'Alexandre', 'Marechal', 'Antoine', + 'Herv��', 'Charpentier', 'Klein', 'Cousin', 'Collet', 'L��ger', 'Ribeiro', 'Hernandez', 'Bailly', 'Schneider', + 'Le Gall', 'Ruiz', 'Langlois', 'Bouvier', 'Gomes', 'Pr��vost', 'Julien', 'Lebrun', 'Breton', 'Germain', 'Millet', + 'Boulanger', 'R��my', 'Le Roux', 'Daniel', 'Marques', 'Maillot', 'Leblanc', 'Le Goff', 'Barre', 'Perrot', + 'L��v��que', 'Marty', 'Benard', 'Monnier', 'Hamon', 'Pelletier', 'Alves', '��tienne', 'Marchal', 'Poulain', + 'Tessier', 'Lema��tre', 'Guichard', 'Besson', 'Mallet', 'Hoareau', 'Gillet', 'Weber', 'Jacob', 'Collin', + 'Chevallier', 'Perrier', 'Michaud', 'Carlier', 'Delaunay', 'Chauvin', 'Alexandre', 'Mar��chal', 'Antoine', 'Lebon', 'Cordier', 'Lejeune', 'Bouchet', 'Pasquier', 'Legros', 'Delattre', 'Humbert', 'De Oliveira', 'Briand', 'Lamy', 'Launay', 'Gilbert', 'Perret', 'Lesage', 'Gay', 'Nguyen', 'Navarro', 'Besnard', 'Pichon', 'Hebert', 'Cohen', 'Pons', 'Lebreton', 'Sauvage', 'De Sousa', 'Pineau', 'Albert', 'Jacques', 'Pinto', 'Barthelemy', - 'Turpin', 'Bigot', 'Lelievre', 'Georges', 'Reynaud', 'Ollivier', 'Martel', 'Voisin', 'Leduc', 'Guillet', - 'Vallee', 'Coulon', 'Camus', 'Marin', 'Teixeira', 'Costa', 'Mahe', 'Didier', 'Charrier', 'Gaudin', 'Bodin', - 'Guillou', 'Gregoire', 'Gros', 'Blanchet', 'Buisson', 'Blondel', 'Paul', 'Dijoux', 'Barbe', 'Hardy', 'Laine', - 'Evrard', 'Laporte', 'Rossi', 'Joubert', 'Regnier', 'Tanguy', 'Gimenez', 'Allard', 'Devaux', 'Morvan', 'Levy', + 'Turpin', 'Bigot', 'Leli��vre', 'Georges', 'Reynaud', 'Ollivier', 'Martel', 'Voisin', 'Leduc', 'Guillet', + 'Vall��e', 'Coulon', 'Camus', 'Marin', 'Teixeira', 'Costa', 'Mahe', 'Didier', 'Charrier', 'Gaudin', 'Bodin', + 'Guillou', 'Gr��goire', 'Gros', 'Blanchet', 'Buisson', 'Blondel', 'Paul', 'Dijoux', 'Barbe', 'Hardy', 'Laine', + 'Evrard', 'Laporte', 'Rossi', 'Joubert', 'Regnier', 'Tanguy', 'Gimenez', 'Allard', 'Devaux', 'Morvan', 'L��vy', 'Dias', 'Courtois', 'Lenoir', 'Berthelot', 'Pascal', 'Vaillant', 'Guilbert', 'Thibault', 'Moreno', 'Duhamel', 'Colas', 'Masse', 'Baudry', 'Bruneau', 'Verdier', 'Delorme', 'Blin', 'Guillon', 'Mary', 'Coste', 'Pruvost', 'Maury', 'Allain', 'Valentin', 'Godard', 'Joseph', 'Brunel', 'Marion', 'Texier', 'Seguin', 'Raynaud', 'Bourdon', 'Raymond', 'Bonneau', 'Chauvet', 'Maurice', 'Legendre', 'Loiseau', 'Ferrand', 'Toussaint', 'Techer', 'Lombard', 'Lefort', 'Couturier', 'Bousquet', 'Diaz', 'Riou', 'Clerc', 'Weiss', 'Imbert', 'Jourdan', 'Delahaye', 'Gilles', - 'Guibert', 'Begue', 'Descamps', 'Delmas', 'Peltier', 'Dupre', 'Chartier', 'Martineau', 'Laroche', 'Leconte', - 'Maillet', 'Parent', 'Labbe', 'Potier', 'Bazin', 'Normand', 'Pottier', 'Torres', 'Lagarde', 'Blot', 'Jacquot', - 'Lemonnier', 'Grenier', 'Rocher', 'Bonnin', 'Boutin', 'Fischer', 'Munoz', 'Neveu', 'Lacombe', 'Mendes', + 'Guibert', 'B��gue', 'Descamps', 'Delmas', 'Peltier', 'Dupr��', 'Chartier', 'Martineau', 'Laroche', 'Leconte', + 'Maillet', 'Parent', 'Labb��', 'Potier', 'Bazin', 'Normand', 'Pottier', 'Torres', 'Lagarde', 'Blot', 'Jacquot', + 'Lemonnier', 'Grenier', 'Rocher', 'Bonnin', 'Boutin', 'Fischer', 'Munoz', 'Neveu', 'Lacombe', 'Mend��s', 'Delannoy', 'Auger', 'Wagner', 'Fouquet', 'Mace', 'Ramos', 'Pages', 'Petitjean', 'Chauveau', 'Foucher', 'Peron', - 'Guyon', 'Gallet', 'Rousset', 'Traore', 'Bernier', 'Vallet', 'Letellier', 'Bouvet', 'Hamel', 'Chretien', + 'Guyon', 'Gallet', 'Rousset', 'Traore', 'Bernier', 'Vallet', 'Letellier', 'Bouvet', 'Hamel', 'Chr��tien', 'Faivre', 'Boulay', 'Thierry', 'Samson', 'Ledoux', 'Salmon', 'Gosselin', 'Lecoq', 'Pires', 'Leleu', 'Becker', 'Diallo', 'Merle', 'Valette', ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-8.11.0/faker/providers/phone_number/pt_BR/__init__.py new/Faker-8.12.1/faker/providers/phone_number/pt_BR/__init__.py --- old/Faker-8.11.0/faker/providers/phone_number/pt_BR/__init__.py 2020-09-14 16:44:35.000000000 +0200 +++ new/Faker-8.12.1/faker/providers/phone_number/pt_BR/__init__.py 2021-08-20 20:05:18.000000000 +0200 @@ -75,6 +75,14 @@ '71 ####-####', '81 ####-####', '84 ####-####', + '0300 ### ####', + '0500 ### ####', + '0800 ### ####', + '0900 ### ####', + '0300-###-####', + '0500-###-####', + '0800-###-####', + '0900-###-####', ) msisdn_formats = ( @@ -102,6 +110,31 @@ '+55 (##) 9 ####-####', ) + services_phones_formats = ( + '100', + '128', + '151', + '152', + '153', + '156', + '180', + '181', + '185', + '188', + '190', + '191', + '192', + '193', + '194', + '197', + '198', + '199', + ) + def cellphone_number(self): pattern = self.random_element(self.cellphone_formats) return self.numerify(self.generator.parse(pattern)) + + def service_phone_number(self): + pattern = self.random_element(self.services_phones_formats) + return self.numerify(self.generator.parse(pattern)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-8.11.0/tests/providers/test_currency.py new/Faker-8.12.1/tests/providers/test_currency.py --- old/Faker-8.11.0/tests/providers/test_currency.py 2021-06-02 14:40:45.000000000 +0200 +++ new/Faker-8.12.1/tests/providers/test_currency.py 2021-08-20 20:05:18.000000000 +0200 @@ -346,3 +346,19 @@ for _ in range(num_samples): pricetag = faker.pricetag() assert isinstance(pricetag, str) + + +class TestPtBr: + """Test pt_BR currency provider""" + + num_samples = 100 + + @classmethod + def setup_class(cls): + from faker.providers.currency.pt_BR import Provider as PtBrCurrencyProvider + cls.provider = PtBrCurrencyProvider + + def test_pricetag(self, faker, num_samples): + for _ in range(num_samples): + pricetag = faker.pricetag() + assert isinstance(pricetag, str) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-8.11.0/tests/providers/test_date_time.py new/Faker-8.12.1/tests/providers/test_date_time.py --- old/Faker-8.11.0/tests/providers/test_date_time.py 2021-06-23 17:41:35.000000000 +0200 +++ new/Faker-8.12.1/tests/providers/test_date_time.py 2021-08-20 20:05:18.000000000 +0200 @@ -25,6 +25,7 @@ from faker.providers.date_time.hy_AM import Provider as HyAmProvider from faker.providers.date_time.it_IT import Provider as ItItProvider from faker.providers.date_time.pl_PL import Provider as PlProvider +from faker.providers.date_time.pt_BR import Provider as PtBrProvider from faker.providers.date_time.pt_PT import Provider as PtPtProvider from faker.providers.date_time.ro_RO import Provider as RoRoProvider from faker.providers.date_time.ru_RU import Provider as RuProvider @@ -1103,6 +1104,21 @@ assert month in TrTrProvider.MONTH_NAMES.values() +class TestPtBr(unittest.TestCase): + + def setUp(self): + self.fake = Faker('pt_BR') + Faker.seed(0) + + def test_day(self): + day = self.fake.day_of_week() + assert day in PtBrProvider.DAY_NAMES.values() + + def test_month(self): + month = self.fake.month_name() + assert month in PtBrProvider.MONTH_NAMES.values() + + class TestPtPt(unittest.TestCase): def setUp(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-8.11.0/tests/providers/test_internet.py new/Faker-8.12.1/tests/providers/test_internet.py --- old/Faker-8.11.0/tests/providers/test_internet.py 2021-08-03 17:23:50.000000000 +0200 +++ new/Faker-8.12.1/tests/providers/test_internet.py 2021-08-12 19:07:14.000000000 +0200 @@ -14,6 +14,7 @@ from faker.providers.internet.es_ES import Provider as EsEsInternetProvider from faker.providers.internet.pl_PL import Provider as PlPlInternetProvider from faker.providers.internet.ro_RO import Provider as RoRoInternetProvider +from faker.providers.internet.ru_RU import Provider as RuRuInternetProvider from faker.providers.internet.th_TH import Provider as ThThInternetProvider from faker.providers.internet.zh_CN import Provider as ZhCnInternetProvider from faker.providers.person.ja_JP import Provider as JaPersonProvider @@ -691,6 +692,43 @@ assert tld in PlPlInternetProvider.tlds +class TestRuRu: + """Test ru_RU internet provider methods""" + + def test_free_email_domain(self, faker): + assert faker.free_email_domain() in RuRuInternetProvider.free_email_domains + + def test_tld(self, faker): + assert faker.tld() in RuRuInternetProvider.tlds + + @patch( + 'faker.providers.internet.Provider.user_name', + lambda x: '��������������������', + ) + def test_ascii_safe_email(self, faker): + email = faker.ascii_safe_email() + validate_email(email) + assert email.split('@')[0] == 'ivanivanov' + + @patch( + 'faker.providers.internet.Provider.user_name', + lambda x: '��������������������������������', + ) + def test_ascii_free_email(self, faker): + email = faker.ascii_free_email() + validate_email(email) + assert email.split('@')[0] == 'aleksandrsmirnov' + + @patch( + 'faker.providers.internet.Provider.user_name', + lambda x: '����������������������������', + ) + def test_ascii_company_email(self, faker): + email = faker.ascii_company_email() + validate_email(email) + assert email.split('@')[0] == 'sergekuznetsov' + + class TestThTh: """Test th_TH internet provider methods""" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-8.11.0/tests/providers/test_phone_number.py new/Faker-8.12.1/tests/providers/test_phone_number.py --- old/Faker-8.11.0/tests/providers/test_phone_number.py 2021-07-07 20:51:05.000000000 +0200 +++ new/Faker-8.12.1/tests/providers/test_phone_number.py 2021-08-20 20:05:18.000000000 +0200 @@ -37,7 +37,8 @@ pattern = re.compile( r'(?:\+55 )?' r'(?:[1-8]1|84|\((?:0[1-8]1|084)\))' - r' \d{4}[ -]\d{4}', + r' \d{4}[ -]\d{4}|' + r'\d{4}?[ -]\d{3}[ -]\d{4}', ) for _ in range(num_samples): phone_number = faker.phone_number() @@ -59,6 +60,12 @@ cellphone = faker.cellphone_number() assert pattern.fullmatch(cellphone) + def test_service_phone(self, faker, num_samples): + pattern = re.compile(r'1(?:0|2|5|8|9)?(?:[0-9])') + for _ in range(num_samples): + service = faker.service_phone_number() + assert pattern.fullmatch(service) + class TestHuHu: """Test hu_HU phone number provider methods"""
participants (1)
-
Source-Sync