Repository: joke2k/faker
Pull request #1919 (2023-10-08 08:54:42)

Tune Person, cs_CZ
### What does this change

Tune content of Person for cs_CZ, I added a few names, degrees and suffixes

### What was wrong

Only improvement, I missed a few common things for cs_CZ

Many thanks for merge.

george0st: @fcurella , please merge

Patch:
diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index e36b5a73..a049b03e 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 19.6.2
+current_version = 19.9.1
 files = VERSION faker/__init__.py docs/conf.py
 commit = True
 tag = True
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 429fdaa1..e860fa26 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,25 @@
 ## Changelog
 
+### [v19.9.1 - 2023-10-11](https://github.com/joke2k/faker/compare/v19.9.0...v19.9.1)
+
+* Revert "fix type error in `pyfloat`  when `max_value` is `None`" from v19.6.2.
+
+### [v19.9.0 - 2023-10-10](https://github.com/joke2k/faker/compare/v19.8.1...v19.9.0)
+
+* Use DE base for `de_CH` AddressProvider. Thanks @nchiapol.
+
+### [v19.8.1 - 2023-10-10](https://github.com/joke2k/faker/compare/v19.8.0...v19.8.1)
+
+* Fix `person` Latvian provider.
+
+### [v19.8.0 - 2023-10-09](https://github.com/joke2k/faker/compare/v19.7.0...v19.8.0)
+
+*  Add Gender support for Latvian (`lv_LV`) names. Thanks @OskarsPakers.
+
+### [v19.7.0 - 2023-10-09](https://github.com/joke2k/faker/compare/v19.6.2...v19.7.0)
+
+* Add MAC Address Multicast. Thanks @d3vyce.
+
 ### [v19.6.2 - 2023-09-20](https://github.com/joke2k/faker/compare/v19.6.1...v19.6.2)
 
 * fix type error in `pyfloat`  when `max_value` is `None`. Thanks @HugoJP1.
diff --git a/VERSION b/VERSION
index d518155b..bc56672c 100644
--- a/VERSION
+++ b/VERSION
@@ -1,1 +1,1 @@
-19.6.2
+19.9.1
diff --git a/docs/communityproviders.rst b/docs/communityproviders.rst
index c87ee2cf..ed354349 100644
--- a/docs/communityproviders.rst
+++ b/docs/communityproviders.rst
@@ -44,7 +44,7 @@ Here's a list of Providers written by the community:
 | Posts         | Fake posts in markdown    | `mdgen`_                         |
 |               | format                    |                                  |
 +---------------+---------------------------+----------------------------------+
-| PySpark       | Fake PySpark DataFrane    | `faker_pyspark`_                 |
+| PySpark       | Fake PySpark DataFrame    | `faker_pyspark`_                 |
 |               | and Schema generator      |                                  |
 +---------------+---------------------------+----------------------------------+
 | Vehicle       | Fake vehicle information  | `faker_vehicle`_                 |
diff --git a/docs/conf.py b/docs/conf.py
index 1643558b..6c258ae9 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -51,9 +51,9 @@ copyright = "2014, Daniele Faraglia"
 # built documents.
 #
 # The short X.Y version.
-version = "19.6.2"
+version = "19.9.1"
 # The full version, including alpha/beta/rc tags.
-release = "19.6.2"
+release = "19.9.1"
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
diff --git a/faker/__init__.py b/faker/__init__.py
index 33ce6599..7d314085 100644
--- a/faker/__init__.py
+++ b/faker/__init__.py
@@ -2,6 +2,6 @@ from faker.factory import Factory
 from faker.generator import Generator
 from faker.proxy import Faker
 
-VERSION = "19.6.2"
+VERSION = "19.9.1"
 
 __all__ = ("Factory", "Generator", "Faker")
diff --git a/faker/providers/address/de_CH/__init__.py b/faker/providers/address/de_CH/__init__.py
index 3a096b65..be38c107 100644
--- a/faker/providers/address/de_CH/__init__.py
+++ b/faker/providers/address/de_CH/__init__.py
@@ -1,6 +1,6 @@
 from typing import Tuple
 
-from .. import Provider as AddressProvider
+from ..de import Provider as AddressProvider
 
 
 class Provider(AddressProvider):
diff --git a/faker/providers/internet/__init__.py b/faker/providers/internet/__init__.py
index 9dc35254..9898c96e 100644
--- a/faker/providers/internet/__init__.py
+++ b/faker/providers/internet/__init__.py
@@ -582,8 +582,18 @@ class Provider(BaseProvider):
             address = str(IPv6Network(address, strict=False))
         return address
 
-    def mac_address(self) -> str:
-        mac = [self.generator.random.randint(0x00, 0xFF) for _ in range(0, 6)]
+    def mac_address(self, multicast: bool = False) -> str:
+        """
+        Returns a random MAC address.
+
+        :param multicast: Multicast address
+        :returns: MAC Address
+        """
+        mac = [self.generator.random.randint(0x00, 0xFF) for _ in range(0, 5)]
+        if multicast is True:
+            mac.insert(0, self.generator.random.randrange(0x01, 0xFF, 2))
+        else:
+            mac.insert(0, self.generator.random.randrange(0x00, 0xFE, 2))
         return ":".join("%02x" % x for x in mac)
 
     def port_number(self, is_system: bool = False, is_user: bool = False, is_dynamic: bool = False) -> int:
diff --git a/faker/providers/passport/__init__.py b/faker/providers/passport/__init__.py
index b624be1e..0641ed71 100644
--- a/faker/providers/passport/__init__.py
+++ b/faker/providers/passport/__init__.py
@@ -15,7 +15,7 @@ class Provider(BaseProvider):
     passport_number_formats: ElementsType = ()
 
     def passport_dob(self) -> datetime.date:
-        """Generate a datetime date of bisrth."""
+        """Generate a datetime date of birth."""
         birthday = self.generator.date_of_birth()
         return birthday
 
diff --git a/faker/providers/person/cs_CZ/__init__.py b/faker/providers/person/cs_CZ/__init__.py
index c9cbde73..9c811de6 100644
--- a/faker/providers/person/cs_CZ/__init__.py
+++ b/faker/providers/person/cs_CZ/__init__.py
@@ -31,31 +31,48 @@ class Provider(PersonProvider):
     formats = formats_male.copy()
     formats.update(formats_female)
 
+    # Names from
+    # https://cs.wikipedia.org/wiki/Jmeniny_v_%C4%8Cesku
+
     first_names_male = (
         "Adam",
+        "Albert",
         "Alexander",
         "Alexandr",
         "Aleš",
         "Alois",
         "Antonín",
         "Arnošt",
+        "Artur",
         "Bedřich",
+        "Blahoslav",
         "Bohumil",
         "Bohumír",
         "Bohuslav",
+        "Boleslav",
+        "Bořivoj",
         "Břetislav",
+        "Ctibor",
+        "Ctirad",
         "Dalibor",
         "Daniel",
         "David",
         "Denis",
+        "Dobroslav",
         "Dominik",
+        "Drahoslav",
         "Dušan",
         "Eduard",
         "Emil",
         "Erik",
+        "Ferdinand",
+        "Felix",
         "Filip",
         "František",
+        "Horymír",
+        "Hubert",
         "Hynek",
+        "Ignác",
         "Igor",
         "Ivan",
         "Ivo",
@@ -65,11 +82,13 @@ class Provider(PersonProvider):
         "Jaroslav",
         "Jindřich",
         "Jiří",
+        "Jonáš",
         "Josef",
         "Jozef",
         "Ján",
         "Kamil",
         "Karel",
+        "Klement",
         "Kryštof",
         "Ladislav",
         "Leoš",
@@ -79,21 +98,27 @@ class Provider(PersonProvider):
         "Ludvík",
         "Luděk",
         "Lukáš",
+        "Lumír",
         "Marcel",
         "Marek",
         "Marian",
         "Martin",
+        "Matouš",
         "Matyáš",
         "Matěj",
         "Michael",
         "Michal",
+        "Mikuláš",
         "Milan",
         "Miloslav",
         "Miloš",
         "Miroslav",
+        "Mojmír",
+        "Norbert",
         "Oldřich",
         "Ondřej",
         "Otakar",
+        "Oto",
         "Patrik",
         "Pavel",
         "Peter",
@@ -102,6 +127,7 @@ class Provider(PersonProvider):
         "Radek",
         "Radim",
         "Radomír",
+        "Radoslav",
         "Radovan",
         "René",
         "Richard",
@@ -112,13 +138,19 @@ class Provider(PersonProvider):
         "Rudolf",
         "Samuel",
         "Stanislav",
+        "Slavomír",
+        "Svatopluk",
+        "Svatoslav",
+        "Šimon",
         "Tadeáš",
+        "Teodor",
         "Tomáš",
         "Vasyl",
         "Viktor",
         "Vilém",
         "Vladimír",
         "Vladislav",
+        "Vlasta",
         "Vlastimil",
         "Vojtěch",
         "Vratislav",
@@ -127,21 +159,29 @@ class Provider(PersonProvider):
         "Vítězslav",
         "Zbyněk",
         "Zdeněk",
+        "Zikmund",
         "Šimon",
         "Štefan",
         "Štěpán",
     )
 
+    # Names from
+    # https://cs.wikipedia.org/wiki/Jmeniny_v_%C4%8Cesku
+
     first_names_female = (
         "Adéla",
+        "Agáta",
         "Alena",
         "Alexandra",
         "Alice",
         "Alžběta",
+        "Anastázie",
+        "Anděla",
         "Andrea",
         "Aneta",
         "Anežka",
         "Anna",
+        "Apolena",
         "Barbora",
         "Blanka",
         "Blažena",
@@ -152,42 +192,62 @@ class Provider(PersonProvider):
         "Daniela",
         "Danuše",
         "Denisa",
+        "Dita",
         "Dominika",
+        "Dorota",
         "Drahomíra",
+        "Drahoslava",
+        "Edita",
+        "Elena",
         "Eliška",
+        "Ema",
         "Emilie",
+        "Erika",
+        "Ester",
         "Eva",
+        "Evelína",
         "Františka",
         "Gabriela",
         "Hana",
         "Helena",
+        "Hedvika",
         "Ilona",
         "Irena",
         "Iva",
         "Ivana",
         "Iveta",
+        "Ivona",
         "Jana",
         "Jarmila",
         "Jaroslava",
         "Jindřiška",
         "Jitka",
         "Jiřina",
+        "Johana",
+        "Jolana",
+        "Judita",
         "Julie",
         "Kamila",
         "Karolína",
         "Kateřina",
+        "Klaudie",
         "Klára",
         "Kristina",
         "Kristýna",
         "Květa",
         "Květoslava",
+        "Lada",
         "Ladislava",
         "Lenka",
+        "Leona",
         "Libuše",
+        "Linda",
         "Lucie",
         "Ludmila",
+        "Lýdie",
         "Magdalena",
         "Magdaléna",
+        "Mahulena",
         "Marcela",
         "Marie",
         "Markéta",
@@ -204,9 +264,14 @@ class Provider(PersonProvider):
         "Naděžda",
         "Natálie",
         "Nela",
+        "Nina",
         "Nikol",
         "Nikola",
+        "Nora",
+        "Olivie",
         "Olga",
+        "Otýlie",
+        "Patricie",
         "Pavla",
         "Pavlína",
         "Petra",
@@ -217,22 +282,33 @@ class Provider(PersonProvider):
         "Růžena",
         "Sabina",
         "Simona",
+        "Silvie",
+        "Slavěna",
         "Soňa",
         "Stanislava",
+        "Světlana",
         "Sára",
+        "Šárka",
+        "Štěpánka",
         "Tereza",
+        "Vanda",
         "Vendula",
         "Veronika",
+        "Věra",
         "Viktorie",
+        "Vilma",
         "Vladimíra",
         "Vlasta",
         "Věra",
         "Zdenka",
         "Zdeňka",
+        "Zora",
         "Zuzana",
         "Štěpánka",
         "Šárka",
+        "Zdislava",
         "Žaneta",
+        "Žofie",
     )
 
     first_names = first_names_male + first_names_female
@@ -345,10 +421,15 @@ class Provider(PersonProvider):
 
     last_names = last_names_male + last_names_female
 
-    degrees = ("JUDr.", "Ing.", "Bc.", "Mgr.", "MUDr.", "RNDr.")
+    # Degrees from
+    # https://cs.wikipedia.org/wiki/Akademick%C3%BD_titul
+    # https://eprehledy.cz/ceske_tituly.php
+
+    degrees = ("JUDr.", "Ing.", "Bc.", "Mgr.", "MUDr.", "RNDr.",
+               "Ing. arch.", "MVDr.","PhDr.")
 
     prefixes_male = ("pan",) + degrees
 
     prefixes_female = ("paní", "slečna") + degrees
 
-    suffixes = ("CSc.", "DiS.", "Ph.D.", "Th.D.")
+    suffixes = ("CSc.", "DiS.", "Ph.D.", "Th.D.", "DSc.",)
diff --git a/faker/providers/person/lv_LV/__init__.py b/faker/providers/person/lv_LV/__init__.py
index 798eb130..7636995f 100644
--- a/faker/providers/person/lv_LV/__init__.py
+++ b/faker/providers/person/lv_LV/__init__.py
@@ -8,7 +8,7 @@ class Provider(PersonProvider):
         "{{last_name}}, {{first_name}}",
     )
 
-    first_names = (
+    first_names_male = (
         "Ādams",
         "Ādolfs",
         "Agris",
@@ -133,6 +133,9 @@ class Provider(PersonProvider):
         "Voldemārs",
         "Ziedonis",
         "Žanis",
+    )
+
+    first_names_female = (
         "Agnese",
         "Aiga",
         "Aija",
@@ -151,7 +154,6 @@ class Provider(PersonProvider):
         "Ārija",
         "Ausma",
         "Austra",
-        "Baba",
         "Baiba",
         "Berta",
         "Biruta",
@@ -283,8 +285,24 @@ class Provider(PersonProvider):
         "Zigrīda",
     )
 
-    last_names = (
+    first_names = first_names_male + first_names_female
+
+    last_names_nonbinary = (
         "Ābele",
+        "Bite",
+        "Caune",
+        "Krūze",
+        "Lapsa",
+        "Liepa",
+        "Paegle",
+        "Priede",
+        "Roze",
+        "Skuja",
+        "Vīksna",
+        "Zvaigzne",
+    )
+
+    last_names_male = (
         "Āboliņš",
         "Ābols",
         "Alksnis",
@@ -297,9 +315,7 @@ class Provider(PersonProvider):
         "Baltiņš",
         "Bērziņš",
         "Birznieks",
-        "Bite",
         "Briedis",
-        "Caune",
         "Celmiņš",
         "Celms",
         "Cīrulis",
@@ -318,38 +334,30 @@ class Provider(PersonProvider):
         "Krieviņš",
         "Krievs",
         "Krūmiņš",
-        "Krūze",
         "Kundziņš",
         "Lācis",
         "Lagzdiņš",
-        "Lapsa",
         "Līcis",
-        "Liepa",
         "Liepiņš",
         "Lukstiņš",
         "Lūsis",
-        "Paegle",
         "Pērkons",
         "Podnieks",
         "Polis",
-        "Priede",
         "Priedītis",
         "Puriņš",
         "Purmals",
         "Riekstiņš",
-        "Roze",
         "Rozītis",
         "Rubenis",
         "Rudzītis",
         "Saulītis",
         "Siliņš",
-        "Skuja",
         "Skujiņš",
         "Sproģis",
         "Strazdiņš",
         "Turiņš",
         "Vanags",
-        "Vīksna",
         "Vilciņš",
         "Vilks",
         "Vītoliņš",
@@ -360,6 +368,74 @@ class Provider(PersonProvider):
         "Zeltiņš",
         "Ziemelis",
         "Zirnis",
-        "Zvaigzne",
         "Zvirbulis",
     )
+
+    last_names_female = (
+        "Āboliņa",
+        "Ābola",
+        "Alksne",
+        "Apine",
+        "Apsīte",
+        "Auniņa",
+        "Auziņa",
+        "Avotiņa",
+        "Balode",
+        "Bērziņa",
+        "Birzniece",
+        "Briede",
+        "Celmiņa",
+        "Celma",
+        "Cīrule",
+        "Dzene",
+        "Dūmiņa",
+        "Eglīte",
+        "Jaunzema",
+        "Kalēja",
+        "Kalniņa",
+        "Kaņepa",
+        "Kārkliņa",
+        "Kauliņa",
+        "Kļaviņa",
+        "Krastiņa",
+        "Krēsliņa",
+        "Krieviņa",
+        "Krieva",
+        "Krūmiņa",
+        "Kundziņa",
+        "Lāce",
+        "Lagzdiņa",
+        "Līce",
+        "Liepiņa",
+        "Lukstiņa",
+        "Lūse",
+        "Pērkona",
+        "Podniece",
+        "Pole",
+        "Priedīte",
+        "Puriņa",
+        "Purmale",
+        "Riekstiņa",
+        "Rozīte",
+        "Rubene",
+        "Rudzīte",
+        "Saulīte",
+        "Siliņa",
+        "Skujiņa",
+        "Sproģe",
+        "Strazdiņa",
+        "Turiņa",
+        "Vanaga",
+        "Vilciņa",
+        "Vītoliņa",
+        "Vītola",
+        "Zaķe",
+        "Zālīte",
+        "Zariņa",
+        "Zeltiņa",
+        "Ziemele",
+        "Zirne",
+        "Zvirbule",
+    )
+
+    last_names = last_names_male + last_names_female + last_names_nonbinary
diff --git a/faker/providers/python/__init__.py b/faker/providers/python/__init__.py
index dc59a9f3..3118fb89 100644
--- a/faker/providers/python/__init__.py
+++ b/faker/providers/python/__init__.py
@@ -161,20 +161,11 @@ class Provider(BaseProvider):
             raise ValueError("Max value must fit within left digits")
         if left_digits is not None and min_value and math.ceil(math.log10(abs(min_value))) > left_digits:
             raise ValueError("Min value must fit within left digits")
-        if max_value is not None and max_value < -(10**sys.float_info.dig + 1):
-            raise ValueError(f"Max value must be greater than {-10**sys.float_info.dig - 1}")
-        if min_value is not None and min_value > 10**sys.float_info.dig - 1:
-            raise ValueError(f"Min value must be less than {10**sys.float_info.dig - 1}")
 
-        left_digits_requested = left_digits is not None
-        right_digits_requested = right_digits is not None
         # Make sure at least either left or right is set
         if left_digits is None and right_digits is None:
             needed_left_digits = max(1, math.ceil(math.log10(max(abs(max_value or 1), abs(min_value or 1)))))
-            if (sys.float_info.dig - needed_left_digits) < 1:
-                right_digits = 0
-            else:
-                right_digits = self.random_int(1, sys.float_info.dig - needed_left_digits)
+            right_digits = self.random_int(1, sys.float_info.dig - needed_left_digits)
 
         # If only one side is set, choose #digits for other side
         if (left_digits is None) ^ (right_digits is None):
@@ -190,67 +181,32 @@ class Provider(BaseProvider):
                 f"{sys.float_info.dig})",
             )
 
+        sign = ""
         if (min_value is not None) or (max_value is not None):
             # Copy values to ensure we're not modifying the original values and thus going out of bounds
-            temp_min_value = min_value
-            temp_max_value = max_value
+            left_min_value = min_value
+            left_max_value = max_value
             # Make sure left_digits still respected
-            if max_value is None:
-                temp_max_value = 10 ** (left_digits + right_digits)
-                if min_value is not None:
-                    temp_min_value = min_value * 10**right_digits
-            if min_value is None:
-                temp_min_value = -(10 ** (left_digits + right_digits))
-                if max_value is not None:
-                    if max_value < temp_min_value:
-                        temp_min_value = max_value - 1
-                    temp_max_value = max_value * 10**right_digits
+            if left_digits is not None:
+                if max_value is None:
+                    left_max_value = 10**left_digits  # minus smallest representable, adjusted later
+                if min_value is None:
+                    left_min_value = -(10**left_digits)  # plus smallest representable, adjusted later
 
             if max_value is not None and max_value < 0:
-                temp_max_value += 1  # as the random_int will be generated up to max_value - 1
+                left_max_value += 1  # as the random_int will be generated up to max_value - 1
             if min_value is not None and min_value < 0:
-                temp_min_value += 1  # as we then append digits after the left_number
-
-            opposite_signs = (temp_min_value * temp_max_value) < 0
-            if opposite_signs and left_digits_requested:
-                positive_number = self._safe_random_int(
-                    10 ** (left_digits + right_digits - 1),
-                    temp_max_value,
-                    positive=True,
-                )
-                negative_number = self._safe_random_int(
-                    temp_min_value,
-                    -(10 ** (left_digits + right_digits - 1)),
-                    positive=False,
-                )
-                number = self.random_element((positive_number, negative_number))
-            else:
-                number = self._safe_random_int(
-                    temp_min_value,
-                    temp_max_value,
-                    positive,
-                )
-
-            params_requested = (
-                right_digits_requested or left_digits_requested or ((min_value is None) ^ (max_value is None))
+                left_min_value += 1  # as we then append digits after the left_number
+            left_number = self._safe_random_int(
+                left_min_value,
+                left_max_value,
+                positive,
             )
-            if params_requested:
-                result = (
-                    float(f"{str(number)[:-right_digits]}.{str(number)[-right_digits:]}")
-                    if right_digits
-                    else float(number)
-                )
-            else:
-                fix_right_digits_len = right_digits > 0
-                result = float(f"{number}.{self.random_number(right_digits, fix_len=fix_right_digits_len)}")
-
         else:
             sign = "+" if positive else self.random_element(("+", "-"))
-            fix_left_digits_len = left_digits > 0
-            left_number = self.random_number(left_digits, fix_len=fix_left_digits_len)
-            fix_right_digits_len = right_digits > 0
-            result = float(f"{sign}{left_number}.{self.random_number(right_digits, fix_len=fix_right_digits_len)}")
+            left_number = self.random_number(left_digits)
 
+        result = float(f"{sign}{left_number}.{self.random_number(right_digits)}")
         if positive and result == 0:
             if right_digits:
                 result = float("0." + "0" * (right_digits - 1) + "1")
@@ -264,6 +220,17 @@ class Provider(BaseProvider):
             result = min(result, 10**left_digits - 1)
             result = max(result, -(10**left_digits + 1))
 
+        # It's possible for the result to end up > than max_value or < than min_value
+        # When this happens we introduce some variance so we're not always the exactly the min_value or max_value.
+        # Which can happen a lot depending on the difference of the values.
+        # Ensure the variance is bound by the difference between the max and min
+        if max_value is not None:
+            if result > max_value:
+                result = result - (result - max_value + self.generator.random.uniform(0, max_value - min_value))
+        if min_value is not None:
+            if result < min_value:
+                result = result + (min_value - result + self.generator.random.uniform(0, max_value - min_value))
+
         return result
 
     def _safe_random_int(self, min_value: float, max_value: float, positive: bool) -> int:


Test patch:
diff --git a/tests/providers/test_internet.py b/tests/providers/test_internet.py
index 9df8ba01..7a877ce5 100644
--- a/tests/providers/test_internet.py
+++ b/tests/providers/test_internet.py
@@ -304,6 +304,15 @@ class TestInternetProvider:
             assert len(address) <= 39 + 4
             assert re.compile(r"^([0-9a-f]{0,4}:){2,7}[0-9a-f]{0,4}/\d{1,3}$").search(address)
 
+    def test_mac_address(self, faker):
+        provider = InternetProvider(faker)
+
+        unicast_address = provider.mac_address()
+        assert int(unicast_address[0:2], base=16) % 2 == 0
+
+        multicast_address = provider.mac_address(multicast=True)
+        assert int(multicast_address[0:2], base=16) % 2 == 1
+
     def test_port_number(self, faker, num_samples):
         for _ in range(num_samples):
             assert 0 <= faker.port_number() <= 65535
diff --git a/tests/providers/test_person.py b/tests/providers/test_person.py
index 5002f5a9..e361029a 100644
--- a/tests/providers/test_person.py
+++ b/tests/providers/test_person.py
@@ -20,6 +20,7 @@ from faker.providers.person.fr_BE import Provider as FrBEProvider
 from faker.providers.person.ga_IE import Provider as GaIEProvider
 from faker.providers.person.he_IL import Provider as HeILProvider
 from faker.providers.person.hy_AM import Provider as HyAmProvider
+from faker.providers.person.lv_LV import Provider as LvProvider
 from faker.providers.person.ne_NP import Provider as NeProvider
 from faker.providers.person.nl_BE import Provider as NlBEProvider
 from faker.providers.person.or_IN import Provider as OrINProvider
@@ -288,6 +289,64 @@ class TestJaJP(unittest.TestCase):
         assert all(isinstance(s, str) for s in last_name_pair)
 
 
+class TestLvLV(unittest.TestCase):
+    def setUp(self):
+        self.fake = Faker("lv_LV")
+        Faker.seed(0)
+
+    def test_first_name(self):
+        # General first name
+        name = self.fake.first_name()
+        assert name
+        self.assertIsInstance(name, str)
+        assert name in LvProvider.first_names
+
+        # Females first name
+        name = self.fake.first_name_female()
+        assert name
+        self.assertIsInstance(name, str)
+        assert name in LvProvider.first_names
+        assert name in LvProvider.first_names_female
+
+        # Male first name
+        name = self.fake.first_name_male()
+        assert name
+        self.assertIsInstance(name, str)
+        assert name in LvProvider.first_names
+        assert name in LvProvider.first_names_male
+
+    def test_last_name(self):
+        # General last name.
+        name = self.fake.last_name()
+        assert name
+        self.assertIsInstance(name, str)
+        assert name in LvProvider.last_names
+
+        # Females last name.
+        name = self.fake.last_name_female()
+        assert name
+        self.assertIsInstance(name, str)
+        assert name in LvProvider.last_names_female + LvProvider.last_names_nonbinary
+
+        # Females only last name.
+        name = self.fake.last_name_female()
+        assert name
+        self.assertIsInstance(name, str)
+        assert name in LvProvider.last_names_female
+
+        # Male last name.
+        name = self.fake.last_name_male()
+        assert name
+        self.assertIsInstance(name, str)
+        assert name in LvProvider.last_names_male + LvProvider.last_names_nonbinary
+
+        # Male only last name.
+        name = self.fake.last_name_male()
+        assert name
+        self.assertIsInstance(name, str)
+        assert name in LvProvider.last_names_male
+
+
 class TestNeNP(unittest.TestCase):
     def setUp(self):
         self.fake = Faker("ne_NP")
diff --git a/tests/providers/test_python.py b/tests/providers/test_python.py
index d2f0448c..27a2a69e 100644
--- a/tests/providers/test_python.py
+++ b/tests/providers/test_python.py
@@ -162,7 +162,7 @@ class TestPyfloat(unittest.TestCase):
         self.assertGreaterEqual(result, 0)
 
     def test_max_value(self):
-        max_values = (0, 10, -1000, 1000, 999999, 100000000000001.0, -1000000000000001.0)
+        max_values = (0, 10, -1000, 1000, 999999)
 
         for max_value in max_values:
             result = self.fake.pyfloat(max_value=max_value)
@@ -210,32 +210,6 @@ class TestPyfloat(unittest.TestCase):
             self.assertLessEqual(result, 200.321)
             self.assertGreaterEqual(result, 100.123)
 
-    def test_max_none_and_min_value_with_decimals(self):
-        """
-        Combining the max_value and min_value keyword arguments with
-        positive value for min and None for max produces numbers with
-        left and right digits specified produced numbers greater than
-        the supplied min_value.
-        """
-        for _ in range(1000):
-            result = self.fake.pyfloat(min_value=99884.7, max_value=None, left_digits=5, right_digits=2)
-            self.assertGreaterEqual(result, 99884.7)
-            assert len(str(result).strip("-").split(".")[0]) == 5
-            assert len(str(result).strip("-").split(".")[1]) <= 2
-
-    def test_min_none_and_max_value_with_decimals(self):
-        """
-        Combining the max_value and min_value keyword arguments with
-        positive value for max and None for min produces numbers with
-        left and right digits specified produced numbers greater than
-        the supplied min_value.
-        """
-        for _ in range(1000):
-            result = self.fake.pyfloat(min_value=None, max_value=11000.3, left_digits=5, right_digits=2)
-            self.assertLessEqual(result, 11000.3)
-            assert len(str(result).strip("-").split(".")[0]) == 5
-            assert len(str(result).strip("-").split(".")[1]) <= 2
-
     def test_max_and_min_value_negative(self):
         """
         Combining the max_value and min_value keyword arguments with