randfacts 0.21.0__tar.gz → 0.23.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  MIT License
2
- Copyright (c) 2020-2021 Connor Sample
2
+ Copyright (c) 2020-2024 Connor Sample
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
5
5
  in the Software without restriction, including without limitation the rights
@@ -14,4 +14,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14
14
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15
15
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16
16
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17
- SOFTWARE.
17
+ SOFTWARE.
@@ -1,10 +1,17 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: randfacts
3
- Version: 0.21.0
3
+ Version: 0.23.0
4
4
  Summary: Package to generate random facts
5
- Home-page: https://github.com/TabulateJarl8/randfacts
6
- Author: Tabulate
5
+ License: MIT
6
+ License-File: LICENSE
7
+ Author: TabulateJarl8
7
8
  Author-email: tabulatejarl8@gmail.com
9
+ Requires-Python: >=3.6,<4.0
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Natural Language :: English
14
+ Classifier: Operating System :: OS Independent
8
15
  Classifier: Programming Language :: Python :: 3
9
16
  Classifier: Programming Language :: Python :: 3.6
10
17
  Classifier: Programming Language :: Python :: 3.7
@@ -13,14 +20,13 @@ Classifier: Programming Language :: Python :: 3.9
13
20
  Classifier: Programming Language :: Python :: 3.10
14
21
  Classifier: Programming Language :: Python :: 3.11
15
22
  Classifier: Programming Language :: Python :: 3.12
16
- Classifier: Natural Language :: English
17
- Classifier: License :: OSI Approved :: MIT License
18
- Classifier: Operating System :: OS Independent
19
- Classifier: Development Status :: 5 - Production/Stable
20
- Classifier: Intended Audience :: Developers
21
- Requires-Python: >=3.6
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Programming Language :: Python :: 3.14
25
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
+ Requires-Dist: importlib-metadata (>=1.4,<2.0) ; python_version < "3.8"
27
+ Project-URL: Homepage, https://tabulate.tech/software/randfacts/
28
+ Project-URL: Repository, https://github.com/TabulateJarl8/randfacts
22
29
  Description-Content-Type: text/markdown
23
- License-File: LICENSE.txt
24
30
 
25
31
  <p align="center">
26
32
  <img src="https://raw.githubusercontent.com/TabulateJarl8/randfacts/master/imgs/logo-embedded-font.svg" />
@@ -35,6 +41,7 @@ License-File: LICENSE.txt
35
41
  <a href="https://github.com/TabulateJarl8/randfacts/actions/workflows/main.yml"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/TabulateJarl8/randfacts/main.yml?branch=master&label=Duplicate%20Facts%20Test" /></a>
36
42
  <a href="https://github.com/TabulateJarl8"><img alt="GitHub followers" src="https://img.shields.io/github/followers/TabulateJarl8?style=social" /></a>
37
43
  <a href="https://github.com/TabulateJarl8/randfacts"><img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/TabulateJarl8/randfacts?style=social" /></a>
44
+ <a href="https://codecov.io/gh/TabulateJarl8/randfacts"><img src="https://codecov.io/gh/TabulateJarl8/randfacts/graph/badge.svg?token=HUQJ88VXLQ"/></a>
38
45
  <br>
39
46
  <a href="https://ko-fi.com/L4L3L7IO2"><img alt="Kofi Badge" src="https://ko-fi.com/img/githubbutton_sm.svg" /></a>
40
47
  </p>
@@ -118,3 +125,4 @@ More help.
118
125
  ```sh
119
126
  $ python3 -m randfacts --help
120
127
  ```
128
+
@@ -11,6 +11,7 @@
11
11
  <a href="https://github.com/TabulateJarl8/randfacts/actions/workflows/main.yml"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/TabulateJarl8/randfacts/main.yml?branch=master&label=Duplicate%20Facts%20Test" /></a>
12
12
  <a href="https://github.com/TabulateJarl8"><img alt="GitHub followers" src="https://img.shields.io/github/followers/TabulateJarl8?style=social" /></a>
13
13
  <a href="https://github.com/TabulateJarl8/randfacts"><img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/TabulateJarl8/randfacts?style=social" /></a>
14
+ <a href="https://codecov.io/gh/TabulateJarl8/randfacts"><img src="https://codecov.io/gh/TabulateJarl8/randfacts/graph/badge.svg?token=HUQJ88VXLQ"/></a>
14
15
  <br>
15
16
  <a href="https://ko-fi.com/L4L3L7IO2"><img alt="Kofi Badge" src="https://ko-fi.com/img/githubbutton_sm.svg" /></a>
16
17
  </p>
@@ -0,0 +1,133 @@
1
+ [tool.poetry]
2
+ name = "randfacts"
3
+ version = "0.23.0"
4
+ description = "Package to generate random facts"
5
+ authors = ["TabulateJarl8 <tabulatejarl8@gmail.com>"]
6
+ license = "MIT"
7
+ readme = "README.md"
8
+ include = ["randfacts/*.txt"]
9
+ homepage = "https://tabulate.tech/software/randfacts/"
10
+ repository = "https://github.com/TabulateJarl8/randfacts"
11
+ classifiers = [
12
+ "Programming Language :: Python :: 3",
13
+ "Programming Language :: Python :: 3.6",
14
+ "Programming Language :: Python :: 3.7",
15
+ "Programming Language :: Python :: 3.8",
16
+ "Programming Language :: Python :: 3.9",
17
+ "Programming Language :: Python :: 3.10",
18
+ "Programming Language :: Python :: 3.11",
19
+ "Programming Language :: Python :: 3.12",
20
+ "Programming Language :: Python :: 3.13",
21
+ "Programming Language :: Python :: 3.14",
22
+ "Natural Language :: English",
23
+ "License :: OSI Approved :: MIT License",
24
+ "Operating System :: OS Independent",
25
+ "Development Status :: 5 - Production/Stable",
26
+ "Intended Audience :: Developers",
27
+ "Topic :: Software Development :: Libraries :: Python Modules",
28
+ ]
29
+ packages = [{ include = 'randfacts' }]
30
+
31
+ [tool.poetry.scripts]
32
+ randfacts = 'randfacts.randfacts:_cli_entrypoint'
33
+
34
+ [tool.pyright]
35
+ reportUnusedCallResult = false
36
+
37
+ [tool.ruff.lint]
38
+ preview = true
39
+ select = ["ALL"]
40
+
41
+ ignore = [
42
+ # complains about tab indentation
43
+ "W191",
44
+ "D206",
45
+ # adds a line break before a class docstring
46
+ "D203",
47
+ # puts the first line summary of a docstring on a different line than the """
48
+ "D213",
49
+ # tries to add a blank line after the last docstring section
50
+ "D413",
51
+ # yells at you if you use a bool typed function argument
52
+ "FBT001",
53
+ "FBT002",
54
+ # yells at you for using try-except in a for loop
55
+ "PERF203",
56
+ # allow for the use of Any
57
+ "ANN401",
58
+ # false positives for overriding methods (i think)
59
+ "PLR6301",
60
+ # disable too many branches check
61
+ "PLR0912",
62
+ # copyright at top of file
63
+ "CPY",
64
+ # complains about random.choice() not being good for cryptography
65
+ "S311",
66
+ ]
67
+
68
+
69
+ [tool.ruff.lint.per-file-ignores]
70
+ "tests/*" = [
71
+ "S101",
72
+ "ANN001",
73
+ "ANN002",
74
+ "PLC2701",
75
+ "ARG002",
76
+ "PLR2004",
77
+ "DOC",
78
+ "INP001",
79
+ "S",
80
+ ]
81
+ "randfacts/randfacts.py" = ["T201"]
82
+ "randfacts/__main__.py" = ["D100"]
83
+
84
+ [tool.ruff.lint.pydocstyle]
85
+ convention = "google"
86
+
87
+ [tool.ruff.format]
88
+ quote-style = "double"
89
+ indent-style = "tab"
90
+ line-ending = "lf"
91
+
92
+ [tool.ruff.lint.isort]
93
+ combine-as-imports = true
94
+ force-wrap-aliases = true
95
+ order-by-type = true
96
+
97
+ [tool.poetry.dependencies]
98
+ python = "^3.6"
99
+ importlib-metadata = { version = "^1.4", python = "<3.8" }
100
+
101
+ [tool.poetry.group.dev.dependencies]
102
+ ruff = [
103
+ { version = "^0.14.11", python = "^3.9" },
104
+ { version = "^0.7.4", python = ">=3.7,<3.9" },
105
+ ]
106
+ pytest = [
107
+ { version = "^9.0.2", python = "^3.10" },
108
+ { version = "^8.3.3", python = ">=3.9,<3.10" },
109
+ { version = "^6.2.0", python = ">=3.6,<3.8" },
110
+ ]
111
+ pytest-cov = [
112
+ { version = "^7.0.0", python = "^3.9" },
113
+ { version = "^5.0.0", python = ">=3.8,<3.9" },
114
+ { version = "^4.0.0", python = ">=3.6,<3.8" },
115
+ ]
116
+ mypy = [
117
+ { version = "^1.19.1", python = "^3.9" },
118
+ { version = "~1.14.0", python = ">=3.8,<3.9" },
119
+ { version = "~1.4.0", python = ">=3.7,<3.8" },
120
+ ]
121
+
122
+ [tool.coverage.run]
123
+ omit = ["randfacts/__main__.py"]
124
+
125
+ # legacy import: ingore types
126
+ [tool.mypy]
127
+ [[tool.mypy.overrides]]
128
+ module = "importlib_metadata.*"
129
+ ignore_missing_imports = true
130
+
131
+ [build-system]
132
+ requires = ["poetry-core"]
133
+ build-backend = "poetry.core.masonry.api"
@@ -0,0 +1,57 @@
1
+ """Module to generate random facts.
2
+
3
+ randfacts provides an interface to a list of facts installed with the module.
4
+ You can retrieve facts via the get_fact method. randfacts also allows for
5
+ execution via the command line. See the examples section for more details.
6
+
7
+ Code Examples:
8
+ Example usage of randfacts in code.
9
+
10
+ Generate a random SFW (safe for work) fact.
11
+
12
+ >>> randfacts.get_fact()
13
+
14
+ Generate a random NSFW (not safe for work) fact.
15
+
16
+ >>> randfacts.get_fact(only_unsafe=True)
17
+
18
+ Generate a random mixed fact (possibility of both SFW and NSFW facts)
19
+
20
+ >>> randfacts.get_fact(filter_enabled=False)
21
+
22
+ CLI Examples:
23
+ randfacts can be executed via the command line with the following commands:
24
+
25
+ Normal execution; only safe facts
26
+
27
+ $ python3 -m randfacts
28
+
29
+ The unsafe argument can be supplied to provide only unsafe facts
30
+
31
+ $ python3 -m randfacts --unsafe
32
+
33
+ The mixed argument can be provided to provide both SFW and NSFW facts.
34
+
35
+ $ python3 -m randfacts --mixed
36
+
37
+ More help.
38
+
39
+ $ python3 -m randfacts --help
40
+
41
+ """
42
+
43
+ from randfacts.randfacts import (
44
+ __version__,
45
+ all_facts,
46
+ get_fact,
47
+ safe_facts,
48
+ unsafe_facts,
49
+ )
50
+
51
+ __all__ = [
52
+ "__version__",
53
+ "all_facts",
54
+ "get_fact",
55
+ "safe_facts",
56
+ "unsafe_facts",
57
+ ]
@@ -0,0 +1,3 @@
1
+ from .randfacts import _cli_entrypoint # pyright: ignore[reportPrivateUsage]
2
+
3
+ _cli_entrypoint()
@@ -0,0 +1,94 @@
1
+ """Contains the core functionality of randfacts."""
2
+
3
+ import argparse
4
+ import sys
5
+ from pathlib import Path
6
+ from random import choice
7
+
8
+ if sys.version_info >= (3, 8): # noqa: UP036
9
+ from importlib import metadata
10
+ else:
11
+ import importlib_metadata as metadata
12
+
13
+ __version__: str = metadata.version("randfacts")
14
+
15
+ dir_path = Path(__file__).resolve().parent
16
+
17
+ with (dir_path / "safe.txt").open(encoding="utf-8") as f:
18
+ safe_facts = [fact.rstrip("\r\n ") for fact in f if fact.rstrip("\r\n ")]
19
+
20
+ with (dir_path / "unsafe.txt").open(encoding="utf-8") as f:
21
+ unsafe_facts = [fact.rstrip("\r\n ") for fact in f if fact.rstrip("\r\n ")]
22
+
23
+ all_facts = safe_facts + unsafe_facts
24
+
25
+
26
+ def get_fact(filter_enabled: bool = True, only_unsafe: bool = False) -> str:
27
+ """This function returns a random fact.
28
+
29
+ Parameters
30
+ ----------
31
+ filter_enabled : bool
32
+ The `filter_enabled` parameter determines if the function will filter
33
+ out potentially inappropriate facts. Defaults to True.
34
+
35
+ only_unsafe : bool
36
+ The `only_unsafe` parameter determines if the function will only give
37
+ unsafe (NSFW) facts. Takes precedence over the `filter_enabled` argument.
38
+
39
+ Returns:
40
+ ------
41
+ str
42
+ A random fact.
43
+
44
+ """
45
+ if only_unsafe:
46
+ return choice(unsafe_facts)
47
+ if not filter_enabled:
48
+ return choice(all_facts)
49
+ return choice(safe_facts)
50
+
51
+
52
+ def _cli_entrypoint() -> None:
53
+ """Entrypoint for execution via command-line."""
54
+ parser = argparse.ArgumentParser(
55
+ description="Generate random facts from the command-line",
56
+ )
57
+
58
+ parser.add_argument(
59
+ "-V",
60
+ "--version",
61
+ action="store_true",
62
+ help="Print the package version and exit",
63
+ )
64
+
65
+ group = parser.add_mutually_exclusive_group()
66
+ group.add_argument(
67
+ "-m",
68
+ "--mixed",
69
+ action="store_true",
70
+ help="Include safe and unsafe facts",
71
+ )
72
+
73
+ group.add_argument(
74
+ "-u",
75
+ "--unsafe",
76
+ action="store_true",
77
+ help="Only include unsafe facts",
78
+ )
79
+
80
+ args = parser.parse_args()
81
+
82
+ if args.version: # pyright: ignore[reportAny]
83
+ print(__version__)
84
+ return
85
+ if args.mixed: # pyright: ignore[reportAny]
86
+ print(get_fact(filter_enabled=False))
87
+ elif args.unsafe: # pyright: ignore[reportAny]
88
+ print(get_fact(only_unsafe=True))
89
+ else:
90
+ print(get_fact())
91
+
92
+
93
+ if __name__ == "__main__":
94
+ _cli_entrypoint()
@@ -378,7 +378,7 @@ Whales can suffer from sunburns
378
378
  In 2015, a U.S. journalist was sentenced to 5 years in jail for posting a link on the web
379
379
  South Koreans drink twice as much alcohol as Russians
380
380
  A newborn baby has about one cup of blood in his body.
381
- 4%of women in the U.S. are pregnant right now
381
+ 4% of women in the U.S. are pregnant right now
382
382
  The world's longest hangover lasted 4 weeks after a Scotsman consumed 60 pints of beer.
383
383
  In 1962, John F Kennedy secretly installed a taping system in the White House.
384
384
  Men with shaved heads are perceived as an inch taller and 13% stronger than men with hair.
@@ -850,7 +850,6 @@ Historically, for every 100 climbers who have made it to the summit of Mount Eve
850
850
  Robert F. Kennedy was shot by a Palestinian because of his strong support for Israel.
851
851
  London ranked as the 6th most expensive city to live in 2016
852
852
  Some Buddhist monks in Japan used to practice self-mummification by adhering to a special diet, then sealing themselves alive into burial chambers.
853
- Einstein was offered the presidency of Israel which he politely declined.
854
853
  In Finland, 9 out of 10 plastic bottles are returned for recycling and almost 100% of glass bottles are also recycled.
855
854
  The word "mortgage" comes from a French word that means "death contract".
856
855
  D'oh! is a real word in the Oxford English Dictionary . In The Simpsons scripts, it just says "annoyed grunt.
@@ -1269,7 +1268,7 @@ Having an orgasm at least 3 times a week cuts in half the likelihood of coronary
1269
1268
  30 million people in China live on less than US$1 per day, as of 2019.
1270
1269
  Brazil is defined as a "federal republic" composed of the Federal District, 26 states, and 5,570 municipalities.
1271
1270
  People with autism are less likely to catch yawns. The more severe their condition, the less common the behavior gets.
1272
- Mexico has68 official languages.
1271
+ Mexico has 68 official languages.
1273
1272
  Girls who complete secondary school are 6 times less likely to become child brides
1274
1273
  La Paz, Bolivia, was the first South American city to get an electricity supply. It was powered by llama dung
1275
1274
  Penguins have an organ near the eye that filters salt from the water out of their system
@@ -3159,7 +3158,6 @@ The meaning of Siberia is "sleeping land."
3159
3158
  Ancient Romans at one time used human urine as an ingredient in their toothpaste
3160
3159
  Billie Jean by Michael Jackson was the first video to air on MTV by a black artist
3161
3160
  Eyebrow hair lasts between 3-5 months before it sheds
3162
- An elephant cannot jump
3163
3161
  Scientists say that babies that are breastfed are more likely to be slimmer as adults than those that are not breastfed
3164
3162
  The reason why the Mexican sombrero hat is so wide is to provide shade for the entire body
3165
3163
  Amazingly, goalies in the National Hockey League played without masks until the year 1959
@@ -3843,7 +3841,6 @@ The loss of eyelashes is referred to as madarosis
3843
3841
  Approximately 75% of human poop is made of water
3844
3842
  The popular chocolate bar "Three Musketeers" got its name because when it was first introduced in 1932 there were three individual bars. The flavours were strawberry, chocolate, and vanilla
3845
3843
  Every photograph of the first American atomic bomb detonation was taken by Harold Edgerton
3846
- Heinz Catsup leaving the bottle travels at 25 miles per year
3847
3844
  In 1864, A Quebec farmer found a frog inside a hailstone
3848
3845
  Actor Sylvester Stallone once had a job as a lion cage cleaner
3849
3846
  The first time there was an instance where they had a separate toilet for women and men was in 1739 at a ball in Paris
@@ -4264,7 +4261,6 @@ Mario, of Super Mario Bros. fame, appeared in the 1981 arcade game, Donkey Kong.
4264
4261
  Women are 37% more likely to go to a psychiatrist than men are.
4265
4262
  Diet Coke was only invented in 1982.
4266
4263
  There are more than 1,700 references to gems and precious stones in the King James translation of the Bible.
4267
- American car horns beep in the tone of F.
4268
4264
  Turning a clock's hands counterclockwise while setting it is not necessarily harmful. It is only damaging when the timepiece contains a chiming mechanism.
4269
4265
  There are twice as many kangaroos in Australia as there are people. The kangaroo population is estimated at about 40 million.
4270
4266
  Police dogs are trained to react to commands in a foreign language; commonly German but more recently Hungarian.
@@ -4377,7 +4373,6 @@ There are more chickens than people in the world (at least before that chicken-f
4377
4373
  All 50 states are listed across the top of the Lincoln Memorial on the back of the $5 bill.
4378
4374
  The slogan on New Hampshire license plates is "Live Free or Die." These license plates are manufactured by prisoners in the state prison in Concord.
4379
4375
  Hydrogen gas is the least dense substance in the world, at 0.08988g/cc. Hydrogen solid is the most dense substance in the world, at 70.6g/cc.
4380
- The longest place name still in use is: Taumatawhakatangihangaoauauotam-eteaturipukakapikimaungahoronukupokai-whenu a kitanatahu – a New Zealand hill.
4381
4376
  Only 1 in 2,000,000,000 will live to be 116 or older.
4382
4377
  When you tie a noose, the rope is wrapped twelve times around because it's the same length as a persons head.
4383
4378
  The sentence, "The quick brown fox jumps over the lazy dog," uses every letter in the alphabet.
@@ -4397,7 +4392,6 @@ To escape the grip of a crocodile's jaws, push your thumbs into its eyeballs –
4397
4392
  Reindeer like to eat bananas.
4398
4393
  More people are killed annually by donkeys than airplane crashes.
4399
4394
  Because of the rotation of the earth, an object can be thrown farther if it is thrown west.
4400
- The average person spends 6 months of their life sitting at red lights.
4401
4395
  More Monopoly money is printed in a year, than real money throughout the world.
4402
4396
  Caesar salad has nothing to do with any of the Caesars. It was first concocted in a bar in Tijuana, Mexico, in the 1920′s.
4403
4397
  Seattle's Fremont Bridge rises up and down more than any drawbridge in the world.
@@ -4457,7 +4451,6 @@ Golf courses cover 4% of North America.
4457
4451
  The average person will accidentally eat just under a pound of insects every year.
4458
4452
  Until 1994, world maps and globes sold in Albania only had Albania on them.
4459
4453
  The value of Pi will be officially "rounded down" to 3.14 from 3.14159265359 on December 31, 1999.
4460
- The Great Wall of China is the only man-made structure visible from space.
4461
4454
  A piece of paper can be folded no more then 9 times.
4462
4455
  The amount of computer Memory required to run WordPerfect for Win95 is 8 times the amount needed aboard the space shuttle.
4463
4456
  The average North American will eat 35,000 cookies during their life span.
@@ -4596,7 +4589,6 @@ Bullet proof vests, fire escapes, windshield wipers, and laser printers were all
4596
4589
  Lorne Greene had one of his nipples bitten off by an alligator while he was host of "Lorne Greene's Wild Kingdom."
4597
4590
  Who's that playing the piano on the "Mad About You" theme? Paul Reiser himself.
4598
4591
  Over 1000 birds a year die from smashing into windows!
4599
- Recycling one glass jar, saves enough energy to watch T.V for 3 hours!
4600
4592
  Q is the only letter in the alphabet that does not appear in the name of any of the United States!
4601
4593
  166,875,000,000 pieces of mail are delivered each year in the US
4602
4594
  Daffy Duck's middle name is "Dumas"
@@ -5077,7 +5069,6 @@ Many insects can carry 50 times their own body weight. This would be like an adu
5077
5069
  There are over a million described species of insects. Some people estimate there are actually between 15 and 30 million species.
5078
5070
  Most insects are beneficial to people because they eat other insects, pollinate crops, are food for other animals, make products we use (like honey and silk) or have medical uses.
5079
5071
  Butterflies and insects have their skeletons on the outside of their bodies, called the exoskeleton. This protects the insect and keeps water inside their bodies so they don't dry out.
5080
- Elephants are the only mammals that cannot jump.
5081
5072
  11% of the world is left-handed.
5082
5073
  A healthy (non-colorblind) human eye can distinguish between 500 shades of gray.
5083
5074
  Lizards can self-amputate their tails for protection. It grows back after a few months.
@@ -5119,7 +5110,6 @@ In a survey of 200000 ostriches over 80 years, not one tried to bury its head in
5119
5110
  Andorra, a tiny country between France & Spain, has the longest average lifespan: 83.49 years.
5120
5111
  In America you will see an average of 500 advertisements a day.
5121
5112
  John Lennon's first girlfriend was named Thelma Pickles.
5122
- You can lead a cow upstairs but not downstairs.
5123
5113
  "Duff" is the decaying organic matter found on a forest floor.
5124
5114
  The US has more personal computers than the next 7 countries combined.
5125
5115
  Kuwait is about 60% male (highest in the world). Latvia is about 54% female (highest in the world).
@@ -5473,7 +5463,6 @@ Ketchup Used to Be Considered a Medicine
5473
5463
  Polar Bears Don't Have White Skin or Fur
5474
5464
  Sudan Has Almost Twice as Many Pyramids as Egypt
5475
5465
  Barbie and Ken Have Full Names
5476
- About 1 Out of Every 2,000 Babies Is Born With a Tooth
5477
5466
  T-Mobile Owns the Color Magenta
5478
5467
  The Only Words That Rhyme With "Purple" Are "Hirple" and "Curple"
5479
5468
  The Vatican's ATMs Are in Latin
@@ -5602,7 +5591,6 @@ Sign language has tongue twisters.
5602
5591
  Penguins fly underwater.
5603
5592
  Minnie the Mouse's first name is not Minnie.
5604
5593
  Rudolph the Reindeer is female.
5605
- A jiffy is a proper unit of time.
5606
5594
  April 11, 1954, was recorded as the most boring day in the world.
5607
5595
  Tiramisu translates to 'take me to heaven' in Italian.
5608
5596
  Buttermilk does not contain any butter.
@@ -5758,7 +5746,6 @@ Up to 20% of power outages in the U.S are due to squirrels.
5758
5746
  The Mayo Clinic made glow in the dark cats while trying to find a cure for AIDS.
5759
5747
  The Antarctic glaciers are made up of 3% penguin urine.
5760
5748
  The happiest prisoner on death row had an IQ of 46.
5761
- Violin bows are made from horsehair.
5762
5749
  IKEA is an acronym.
5763
5750
  Stephen Hawking held a reception for time travelers in 2009.
5764
5751
  A Norwegian Island made dying illegal.
@@ -6203,7 +6190,7 @@ The man who designed the Pringles can, Fred Bauer, is buried in one-or at least
6203
6190
  There's a world record for the holder of the most world records: Ashrita Furman, who's set more than 600 records and currently holds more than 200. His records have ranged from fastest mile on a pogo stick, longest time to hula hoop underwater and greatest distance traveled on a bicycle balancing a milk bottle on the head.
6204
6191
  The sun makes up more than 99% of the mass in our solar system.
6205
6192
  Lined up, all of the planets in the solar system could fit between the Earth and the moon.
6206
- The Great Wall of China is not actually visible from space.
6193
+ The Great Wall of China is not actually visible from space with the naked eye.
6207
6194
  One million Earths could fit inside the sun.
6208
6195
  It rains diamonds on both Jupiter and Saturn. On these planets, lightning turns methane in the atmosphere into carbon, which hardens into bits of graphite and diamond as it falls to the ground.
6209
6196
  Outer space is completely silent.
@@ -6212,7 +6199,6 @@ The largest known volcano in the solar system is Olympus Mons, located on Mars.
6212
6199
  On Mars, sunsets appear blue due to the way light is captured in the atmosphere.
6213
6200
  Because there is no atmosphere, wind, or water to erode them, astronaut footprints on the moon will likely remain there for hundreds of millions of years.
6214
6201
  One spacesuit for a NASA astronaut costs $12 million to make.
6215
- Uranus is the only planet to spin on its side.
6216
6202
  The diameter of Pluto is smaller than the horizontal length of the United States.
6217
6203
  The Kármán line, the invisible boundary that officially separates Earth from outer space, is located 62 miles above sea level. So you're only about 62 miles from space right now!
6218
6204
  It's impossible to burp in space. The lack of gravity in space prevents air in your stomach from separating and rising up from food you've eaten.
@@ -6350,7 +6336,6 @@ A rainbow can be seen only in the morning or late afternoon. It can occur only w
6350
6336
  Lightning strikes the Earth 100 times every second.
6351
6337
  La Paz, Bolivia has an average annual temperature below 50 degrees Fahrenheit. However, it has never recorded a zero-degree temperature. Same for Stanley, the Falkland Islands, and Punta Arenas, Chile.
6352
6338
  There are over 87,000 Americans on waiting lists for organ transplants.
6353
- Catsup leaves the bottle at a rate of 25 miles per year.
6354
6339
  Toxic house plants poison more children than household chemicals do.
6355
6340
  You are more likely to be infected by flesh-eating bacteria than you are to be struck by lightning.
6356
6341
  It is physically impossible for you to lick your elbow.
@@ -6371,7 +6356,6 @@ A kiss stimulates 29 muscles and chemicals that cause relaxation. Women seem to
6371
6356
  Every time you lick a stamp, you're consuming 1/10 of a calorie.
6372
6357
  Our eyes are always the same size from birth, but our nose and ears never stop growing.
6373
6358
  The average person falls asleep in seven minutes.
6374
- Almost everyone who reads this will try to lick their elbow.
6375
6359
  According to Chinese acupuncture, there is a point on the head that you can press to control your appetite. It is located in the hollow just in front of the flap of the ear.
6376
6360
  In a recent survey, Americans revealed that banana was their favorite smell.
6377
6361
  When opossums are "playing 'possum," they are not playing. They actually pass out from sheer terror.
@@ -6502,7 +6486,6 @@ If Barbie were life-size, her measurements would be 39-23-33. She would stand 7
6502
6486
  On average, people fear spiders more than they do death.
6503
6487
  Thirty-five percent of the people who use personal ads for dating are already married.
6504
6488
  In Tokyo you can buy a toupee for your dog.
6505
- A dime has 118 ridges around the edge.
6506
6489
  The world's oldest wooden wheel has been around for more than 5,000 years
6507
6490
  Dead skin cells are a main ingredient in household dust
6508
6491
  Sudan has more pyramids than any country in the world
@@ -6714,7 +6697,6 @@ NFL refs also get Super Bowl rings.
6714
6697
  President Hubert Hoover invented a game called "Hooverball" which was a cross between tennis and volleyball and was played with a medicine ball.
6715
6698
  Only one city has won three major championships in one year. In 1935, the Detroit Lions won the Super Bowl, the Tigers won the world series, and the Red Wings won the Stanley Cup.
6716
6699
  More than 100 baseballs are used during a typical professional baseball game.
6717
- You can't hum while plugging your nose.
6718
6700
  Tomatoes have more genes than humans.
6719
6701
  We're one to two centimeters taller in the morning than at night.
6720
6702
  One quarter of all our bones are in our feet.
@@ -6761,7 +6743,7 @@ Turns out, a dog's paw print is just as unique as a human's. Good news for dog d
6761
6743
  A camel can drink up to 40 gallons of water in one go. That's seriously impressive!
6762
6744
  Don't bring your crystal ball to Maryland! Fortune telling is illegal in the state.
6763
6745
  Speaking of ferrets, did you know they used to be used to protect grain stores from rodents?
6764
- The technical term for a fear of long words is ""hippopotomonstrosesquippedaliophobia." No way you can self-diagnose yourself with that one!
6746
+ The technical term for a fear of long words is "hippopotomonstrosesquippedaliophobia." No way you can self-diagnose yourself with that one!
6765
6747
  The White House has 35 bathrooms. So every bathroom break can be different for POTUS!
6766
6748
  Greyhounds can run up to 45 mph. So don't challenge one to a race!
6767
6749
  Hiking naked is illegal in Switzerland. Though we must say, it doesn't seem like a good idea in general!
@@ -7020,7 +7002,6 @@ Rubber bands last longer when refrigerated.
7020
7002
  Since 1896, the beginning of the modern Olympics, only Greece and Australia have participated in every Games.
7021
7003
  The average person has over 1,460 dreams a year.
7022
7004
  The band Duran Duran got their name from an astronaut in the 1968 Jane Fonda movie Barbarella.
7023
- The Earth weighs around 6,588,000,000,000,000,000,000,000 tons.
7024
7005
  The first toilet ever seen on television was on "Leave It To Beaver."
7025
7006
  The international telephone dialing code for Antarctica is 672.
7026
7007
  The name "Jeep" came from the abbreviation used in the army for the "general purpose" vehicle, G.P.
@@ -7164,7 +7145,6 @@ Only animal besides a human that can get sunburn: a pig.
7164
7145
  Proportional to their weight, men are stronger than horses.
7165
7146
  It is believed that Shakespeare was 46 around the time that the King James Version of the Bible was written. In Psalms 46, the 46th word from the first word is "shake," and the 46th word from the last word is "spear."
7166
7147
  The parachute was invented by Leonardo da Vinci in 1515.
7167
- "Canada" is a Native American word meaning "big village."
7168
7148
  The symbol on the "pound" key (#) is called an octothorpe.
7169
7149
  A full 7% of the entire Irish barley crop goes to the production of Guinness beer.
7170
7150
  Tigers have striped skin, not just striped fur.
@@ -7346,7 +7326,6 @@ There's an ant species unique to New York City.
7346
7326
  The Eiffel Tower was originally intended for Barcelona.
7347
7327
  There's only one Shell garage actually shaped like a Shell.
7348
7328
  The shortest commercial flight in the world is in Scotland.
7349
- Dolphins have names for one another.
7350
7329
  The blob of toothpaste on a toothbrush has a name - a nurdle.
7351
7330
  One part of Istanbul is in Europe and the other is in Asia.
7352
- There are more than 1,000 types of bananas growing in the world.
7331
+ There are more than 1,000 types of bananas growing in the world.
@@ -112,4 +112,4 @@ During the medieval times (circa 1400s), France had impotency trials. Which allo
112
112
  Dildos have been around for centuries. With the oldest potential dildo being 28,000 years old.
113
113
  Vibrators were created in the 19th century to reduce "hysteria" in women.
114
114
  Famous gangster, Al Capone, had undiagnosed syphillis until he went to prison.
115
- According to a British law passed in 1845, attempting to commit suicide was a capital offense. Offenders could be hanged for trying.
115
+ According to a British law passed in 1845, attempting to commit suicide was a capital offense. Offenders could be hanged for trying.
@@ -1 +0,0 @@
1
- include randfacts/*.txt
randfacts-0.21.0/PKG-INFO DELETED
@@ -1,120 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: randfacts
3
- Version: 0.21.0
4
- Summary: Package to generate random facts
5
- Home-page: https://github.com/TabulateJarl8/randfacts
6
- Author: Tabulate
7
- Author-email: tabulatejarl8@gmail.com
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: Programming Language :: Python :: 3.6
10
- Classifier: Programming Language :: Python :: 3.7
11
- Classifier: Programming Language :: Python :: 3.8
12
- Classifier: Programming Language :: Python :: 3.9
13
- Classifier: Programming Language :: Python :: 3.10
14
- Classifier: Programming Language :: Python :: 3.11
15
- Classifier: Programming Language :: Python :: 3.12
16
- Classifier: Natural Language :: English
17
- Classifier: License :: OSI Approved :: MIT License
18
- Classifier: Operating System :: OS Independent
19
- Classifier: Development Status :: 5 - Production/Stable
20
- Classifier: Intended Audience :: Developers
21
- Requires-Python: >=3.6
22
- Description-Content-Type: text/markdown
23
- License-File: LICENSE.txt
24
-
25
- <p align="center">
26
- <img src="https://raw.githubusercontent.com/TabulateJarl8/randfacts/master/imgs/logo-embedded-font.svg" />
27
- </p>
28
- <p align="center">
29
- <a href="https://badge.fury.io/py/randfacts"><img alt="PyPI" src="https://img.shields.io/pypi/v/randfacts" /></a>
30
- <a href="https://aur.archlinux.org/packages/python-randfacts/"><img alt="AUR version" src="https://img.shields.io/aur/version/python-randfacts"></a>
31
- <a href="https://pepy.tech/project/randfacts"><img alt="Downloads" src="https://pepy.tech/badge/randfacts" /></a>
32
- <a href="https://pypi.python.org/pypi/randfacts/"><img alt="PyPI license" src="https://img.shields.io/pypi/l/randfacts.svg" /></a>
33
- <a href="https://GitHub.com/TabulateJarl8/randfacts/graphs/commit-activity"><img alt="Maintenance" src="https://img.shields.io/badge/Maintained%3F-yes-green.svg" /></a>
34
- <a href="https://GitHub.com/TabulateJarl8/randfacts/issues/"><img alt="GitHub Issues" src="https://img.shields.io/github/issues/TabulateJarl8/randfacts.svg" /></a>
35
- <a href="https://github.com/TabulateJarl8/randfacts/actions/workflows/main.yml"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/TabulateJarl8/randfacts/main.yml?branch=master&label=Duplicate%20Facts%20Test" /></a>
36
- <a href="https://github.com/TabulateJarl8"><img alt="GitHub followers" src="https://img.shields.io/github/followers/TabulateJarl8?style=social" /></a>
37
- <a href="https://github.com/TabulateJarl8/randfacts"><img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/TabulateJarl8/randfacts?style=social" /></a>
38
- <br>
39
- <a href="https://ko-fi.com/L4L3L7IO2"><img alt="Kofi Badge" src="https://ko-fi.com/img/githubbutton_sm.svg" /></a>
40
- </p>
41
-
42
- Randfacts is a Python module that generates random facts. You can use `randfacts.get_fact()` to return a random fun fact. Disclaimer: Facts are not guaranteed to be true.
43
-
44
- # Installation
45
-
46
- randfacts can either be installed via pip or via the AUR, whichever way you prefer.
47
-
48
- ### Installation via pip:
49
-
50
- ```sh
51
- $ pip3 install randfacts
52
- ```
53
-
54
- ### Installation via AUR:
55
-
56
- Via your AUR helper, like paru:
57
- ```sh
58
- $ paru -S python-randfacts
59
- ```
60
-
61
- Or manually
62
- ```sh
63
- $ git clone https://aur.archlinux.org/python-randfacts.git && cd python-randfacts
64
- $ makepkg -si
65
- ```
66
-
67
- # Usage and examples
68
-
69
- ```python
70
- import randfacts
71
- x = randfacts.get_fact()
72
- print(x)
73
- ```
74
- The above example will print a random fact like:
75
- `Penguins can't taste sweet or savory flavors, only sour and salty ones`
76
-
77
- This package has a filter option to filter out potentially inappropriate facts. The filter is on by default. To disable the filter, you can just set the `filter_enabled` parameter to `False`.
78
- ```python
79
- from randfacts import get_fact
80
- print(get_fact(False))
81
- # or
82
- print(get_fact(filter_enabled=False))
83
- ```
84
-
85
- `get_fact` also has a parameter that will make the function only return unsafe facts. This argument takes precedence over the `filter_enabled` argument. For example:
86
-
87
- ```py
88
- print(get_fact(only_unsafe=True))
89
- ```
90
-
91
- If you want to access the list of facts directly, you can just import the `safe_facts`, `unsafe_facts`, or `all_facts` lists from the randfacts module.
92
-
93
-
94
- ## Command line usage
95
-
96
- randfacts can be executed via the command line with the following commands:
97
-
98
- Normal execution; only SFW (safe for work) facts
99
-
100
- ```sh
101
- $ python3 -m randfacts
102
- ```
103
-
104
- The unsafe argument can be supplied to provide only NSFW (not safe for work) facts
105
-
106
- ```sh
107
- $ python3 -m randfacts --unsafe
108
- ```
109
-
110
- The mixed argument can be provided to provide both SFW and NSFW facts.
111
-
112
- ```sh
113
- $ python3 -m randfacts --mixed
114
- ```
115
-
116
- More help.
117
-
118
- ```sh
119
- $ python3 -m randfacts --help
120
- ```
@@ -1,53 +0,0 @@
1
- """Module to generate random facts.
2
-
3
- randfacts provides an interface to a list of facts installed with the module.
4
- You can retrieve facts via the get_fact method. randfacts also allows for
5
- execution via the command line. See the examples section for more details.
6
-
7
- Code Examples:
8
- Example usage of randfacts in code.
9
-
10
- Generate a random SFW (safe for work) fact.
11
-
12
- >>> randfacts.get_fact()
13
-
14
- Generate a random NSFW (not safe for work) fact.
15
-
16
- >>> randfacts.get_fact(only_unsafe=True)
17
-
18
- Generate a random mixed fact (possibility of both SFW and NSFW facts)
19
-
20
- >>> randfacts.get_fact(False)
21
- >>> # or
22
- >>> randfacts.get_fact(filter_enabled=False)
23
-
24
- CLI Examples:
25
- randfacts can be executed via the command line with the following commands:
26
-
27
- Normal execution; only safe facts
28
-
29
- $ python3 -m randfacts
30
-
31
- The unsafe argument can be supplied to provide only unsafe facts
32
-
33
- $ python3 -m randfacts --unsafe
34
-
35
- The mixed argument can be provided to provide both SFW and NSFW facts.
36
-
37
- $ python3 -m randfacts --mixed
38
-
39
- More help.
40
-
41
- $ python3 -m randfacts --help
42
-
43
- """
44
-
45
- from .__version__ import __title__, __description__, __url__, __version__, __author__, __author_email__, __license__, __copyright__
46
- from randfacts.randfacts import get_fact, safe_facts, unsafe_facts, all_facts
47
-
48
- import warnings as _warnings
49
- # Deprecated methods
50
- def getFact(filter_enabled=True, only_unsafe=False):
51
- """This method is deprecated. Please use get_fact"""
52
- _warnings.warn("getFact is deprecated. Please use get_fact", DeprecationWarning, stacklevel=2)
53
- return get_fact(filter_enabled, only_unsafe)
@@ -1,2 +0,0 @@
1
- from .randfacts import _cli_entrypoint
2
- _cli_entrypoint()
@@ -1,8 +0,0 @@
1
- __title__ = "randfacts"
2
- __description__ = "Package to generate random facts"
3
- __url__ = "https://github.com/TabulateJarl8/randfacts"
4
- __version__ = "0.21.0"
5
- __author__ = "Tabulate"
6
- __author_email__ = "tabulatejarl8@gmail.com"
7
- __license__ = "MIT"
8
- __copyright__ = "Copyright 2020-2023 Connor Sample"
@@ -1,84 +0,0 @@
1
- from random import choice
2
- import os
3
- import argparse
4
-
5
- dir_path = os.path.dirname(os.path.realpath(__file__))
6
-
7
- with open(os.path.join(dir_path, 'safe.txt'), encoding='utf-8') as f:
8
- safe_facts = [
9
- fact.rstrip('\r\n ')
10
- for fact in f.readlines()
11
- if fact.rstrip('\r\n ') != ''
12
- ]
13
-
14
- with open(os.path.join(dir_path, 'unsafe.txt'), encoding='utf-8') as f:
15
- unsafe_facts = [
16
- fact.rstrip('\r\n ')
17
- for fact in f.readlines()
18
- if fact.rstrip('\r\n ') != ''
19
- ]
20
-
21
- all_facts = safe_facts + unsafe_facts
22
-
23
-
24
- def get_fact(filter_enabled: bool = True, only_unsafe: bool = False) -> str:
25
- """This function returns a random fact.
26
-
27
- Parameters
28
- ----------
29
- filter_enabled : bool
30
- The `filter_enabled` parameter determines if the function will filter
31
- out potentially inappropriate facts. Defaults to True.
32
-
33
- only_unsafe : bool
34
- The `only_unsafe` parameter determines if the function will only give
35
- unsafe (NSFW) facts. Takes precedence over the `filter_enabled` argument.
36
-
37
- Returns
38
- ------
39
- str
40
- A random fact.
41
-
42
- """
43
-
44
- if only_unsafe:
45
- return choice(unsafe_facts)
46
- if filter_enabled is False:
47
- return choice(all_facts)
48
- return choice(safe_facts)
49
-
50
-
51
- def _cli_entrypoint():
52
- """Entrypoint for execution via command-line."""
53
-
54
- parser = argparse.ArgumentParser(
55
- description='Generate random facts from the command-line'
56
- )
57
-
58
- group = parser.add_mutually_exclusive_group()
59
- group.add_argument(
60
- '-m',
61
- '--mixed',
62
- action='store_true',
63
- help='Include safe and unsafe facts'
64
- )
65
-
66
- group.add_argument(
67
- '-u',
68
- '--unsafe',
69
- action='store_true',
70
- help='Only include unsafe facts'
71
- )
72
-
73
- args = parser.parse_args()
74
-
75
- if args.mixed:
76
- print(get_fact(False))
77
- elif args.unsafe:
78
- print(get_fact(only_unsafe=True))
79
- else:
80
- print(get_fact())
81
-
82
-
83
- if __name__ == '__main__':
84
- _cli_entrypoint()
@@ -1,16 +0,0 @@
1
- LICENSE.txt
2
- MANIFEST.in
3
- README.md
4
- setup.cfg
5
- setup.py
6
- randfacts/__init__.py
7
- randfacts/__main__.py
8
- randfacts/__version__.py
9
- randfacts/randfacts.py
10
- randfacts/safe.txt
11
- randfacts/unsafe.txt
12
- randfacts.egg-info/PKG-INFO
13
- randfacts.egg-info/SOURCES.txt
14
- randfacts.egg-info/dependency_links.txt
15
- randfacts.egg-info/top_level.txt
16
- tests/test.py
@@ -1 +0,0 @@
1
- randfacts
@@ -1,7 +0,0 @@
1
- [metadata]
2
- description-file = README.md
3
-
4
- [egg_info]
5
- tag_build =
6
- tag_date = 0
7
-
randfacts-0.21.0/setup.py DELETED
@@ -1,43 +0,0 @@
1
- import pathlib
2
- import setuptools
3
-
4
- here = pathlib.Path(__file__).parent.resolve()
5
-
6
- with open(here / "README.md", "r") as fh:
7
- long_description = fh.read()
8
-
9
- about = {}
10
- with open(here / "randfacts/__version__.py", "r") as f:
11
- exec(f.read(), about)
12
-
13
- packages = ['randfacts']
14
-
15
- setuptools.setup(
16
- name=about["__title__"],
17
- version=about["__version__"],
18
- author=about["__author__"],
19
- author_email=about["__author_email__"],
20
- description=about["__description__"],
21
- long_description=long_description,
22
- long_description_content_type="text/markdown",
23
- url=about["__url__"],
24
- packages=packages,
25
- package_dir={'randfacts': 'randfacts'},
26
- classifiers=[
27
- "Programming Language :: Python :: 3",
28
- "Programming Language :: Python :: 3.6",
29
- "Programming Language :: Python :: 3.7",
30
- "Programming Language :: Python :: 3.8",
31
- "Programming Language :: Python :: 3.9",
32
- "Programming Language :: Python :: 3.10",
33
- "Programming Language :: Python :: 3.11",
34
- "Programming Language :: Python :: 3.12",
35
- "Natural Language :: English",
36
- "License :: OSI Approved :: MIT License",
37
- "Operating System :: OS Independent",
38
- "Development Status :: 5 - Production/Stable",
39
- "Intended Audience :: Developers"
40
- ],
41
- python_requires='>=3.6',
42
- include_package_data=True
43
- )
@@ -1,45 +0,0 @@
1
- import unittest
2
- import sys
3
- import pathlib
4
- import subprocess
5
-
6
- sys.path.insert(1, str(pathlib.Path(__file__).parents[1]))
7
- from randfacts import randfacts # local randfacts instead of installed version
8
-
9
- class TestRandfacts(unittest.TestCase):
10
-
11
- def test_get_fact(self):
12
- self.assertIsInstance(randfacts.get_fact(), str, 'get_fact() must return a string')
13
-
14
- def test_all_facts_list(self):
15
- self.assertIsInstance(randfacts.all_facts, list, 'all_facts must be a list')
16
-
17
- def test_safe_facts_list(self):
18
- self.assertIsInstance(randfacts.safe_facts, list, 'safe_facts must be a list')
19
-
20
- def test_unsafe_facts_list(self):
21
- self.assertIsInstance(randfacts.unsafe_facts, list, 'unsafe_facts must be a list')
22
-
23
- def test_cli_no_args(self):
24
- child = subprocess.Popen(['python3', '-m', 'randfacts'], stdout=subprocess.DEVNULL)
25
- child.communicate()
26
- self.assertEqual(child.returncode, 0, '`python3 -m randfacts` must return with exit code 0')
27
-
28
- def test_cli_unsafe_args(self):
29
- child = subprocess.Popen(['python3', '-m', 'randfacts', '--unsafe'], stdout=subprocess.DEVNULL)
30
- child.communicate()
31
- self.assertEqual(child.returncode, 0, '`python3 -m randfacts --unsafe` must return with exit code 0')
32
-
33
- def test_cli_mixed_args(self):
34
- child = subprocess.Popen(['python3', '-m', 'randfacts', '--mixed'], stdout=subprocess.DEVNULL)
35
- child.communicate()
36
- self.assertEqual(child.returncode, 0, '`python3 -m randfacts --mixed` must return with exit code 0')
37
-
38
- def test_invalid_characters(self):
39
- bad_characters = ["‘", "’", "“", "”", "…", "—"]
40
- for index, fact in enumerate(randfacts.all_facts):
41
- for char in bad_characters:
42
- self.assertNotIn(char, fact, f'Index: {index}')
43
-
44
- if __name__ == '__main__':
45
- unittest.main()