Skip to content

Commit aa0ace4

Browse files
cclaussgithub-actions
and
github-actions
authored
Remove exception detail from doctest (TheAlgorithms#5430)
* Remove exception detail from doctest These details are configuration dependant so should be removed according to https://docs.python.org/3/library/doctest.html * updating DIRECTORY.md Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
1 parent 66c96aa commit aa0ace4

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

DIRECTORY.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
* [Binary Shifts](https://github.com/TheAlgorithms/Python/blob/master/bit_manipulation/binary_shifts.py)
3333
* [Binary Twos Complement](https://github.com/TheAlgorithms/Python/blob/master/bit_manipulation/binary_twos_complement.py)
3434
* [Binary Xor Operator](https://github.com/TheAlgorithms/Python/blob/master/bit_manipulation/binary_xor_operator.py)
35+
* [Count 1S Brian Kernighan Method](https://github.com/TheAlgorithms/Python/blob/master/bit_manipulation/count_1s_brian_kernighan_method.py)
3536
* [Count Number Of One Bits](https://github.com/TheAlgorithms/Python/blob/master/bit_manipulation/count_number_of_one_bits.py)
3637
* [Reverse Bits](https://github.com/TheAlgorithms/Python/blob/master/bit_manipulation/reverse_bits.py)
3738
* [Single Bit Manipulation Operations](https://github.com/TheAlgorithms/Python/blob/master/bit_manipulation/single_bit_manipulation_operations.py)
@@ -112,6 +113,7 @@
112113
* [Decimal To Octal](https://github.com/TheAlgorithms/Python/blob/master/conversions/decimal_to_octal.py)
113114
* [Hex To Bin](https://github.com/TheAlgorithms/Python/blob/master/conversions/hex_to_bin.py)
114115
* [Hexadecimal To Decimal](https://github.com/TheAlgorithms/Python/blob/master/conversions/hexadecimal_to_decimal.py)
116+
* [Length Conversions](https://github.com/TheAlgorithms/Python/blob/master/conversions/length_conversions.py)
115117
* [Molecular Chemistry](https://github.com/TheAlgorithms/Python/blob/master/conversions/molecular_chemistry.py)
116118
* [Octal To Decimal](https://github.com/TheAlgorithms/Python/blob/master/conversions/octal_to_decimal.py)
117119
* [Prefix Conversions](https://github.com/TheAlgorithms/Python/blob/master/conversions/prefix_conversions.py)
@@ -381,6 +383,7 @@
381383
* [Polynom For Points](https://github.com/TheAlgorithms/Python/blob/master/linear_algebra/src/polynom_for_points.py)
382384
* [Power Iteration](https://github.com/TheAlgorithms/Python/blob/master/linear_algebra/src/power_iteration.py)
383385
* [Rayleigh Quotient](https://github.com/TheAlgorithms/Python/blob/master/linear_algebra/src/rayleigh_quotient.py)
386+
* [Schur Complement](https://github.com/TheAlgorithms/Python/blob/master/linear_algebra/src/schur_complement.py)
384387
* [Test Linear Algebra](https://github.com/TheAlgorithms/Python/blob/master/linear_algebra/src/test_linear_algebra.py)
385388
* [Transformations 2D](https://github.com/TheAlgorithms/Python/blob/master/linear_algebra/src/transformations_2d.py)
386389

@@ -513,9 +516,10 @@
513516
* [Runge Kutta](https://github.com/TheAlgorithms/Python/blob/master/maths/runge_kutta.py)
514517
* [Segmented Sieve](https://github.com/TheAlgorithms/Python/blob/master/maths/segmented_sieve.py)
515518
* Series
516-
* [Arithmetic Mean](https://github.com/TheAlgorithms/Python/blob/master/maths/series/arithmetic_mean.py)
517-
* [Geometric Mean](https://github.com/TheAlgorithms/Python/blob/master/maths/series/geometric_mean.py)
519+
* [Arithmetic](https://github.com/TheAlgorithms/Python/blob/master/maths/series/arithmetic.py)
520+
* [Geometric](https://github.com/TheAlgorithms/Python/blob/master/maths/series/geometric.py)
518521
* [Geometric Series](https://github.com/TheAlgorithms/Python/blob/master/maths/series/geometric_series.py)
522+
* [Harmonic](https://github.com/TheAlgorithms/Python/blob/master/maths/series/harmonic.py)
519523
* [Harmonic Series](https://github.com/TheAlgorithms/Python/blob/master/maths/series/harmonic_series.py)
520524
* [P Series](https://github.com/TheAlgorithms/Python/blob/master/maths/series/p_series.py)
521525
* [Sieve Of Eratosthenes](https://github.com/TheAlgorithms/Python/blob/master/maths/sieve_of_eratosthenes.py)
@@ -933,6 +937,7 @@
933937
* [Indian Phone Validator](https://github.com/TheAlgorithms/Python/blob/master/strings/indian_phone_validator.py)
934938
* [Is Palindrome](https://github.com/TheAlgorithms/Python/blob/master/strings/is_palindrome.py)
935939
* [Jaro Winkler](https://github.com/TheAlgorithms/Python/blob/master/strings/jaro_winkler.py)
940+
* [Join](https://github.com/TheAlgorithms/Python/blob/master/strings/join.py)
936941
* [Knuth Morris Pratt](https://github.com/TheAlgorithms/Python/blob/master/strings/knuth_morris_pratt.py)
937942
* [Levenshtein Distance](https://github.com/TheAlgorithms/Python/blob/master/strings/levenshtein_distance.py)
938943
* [Lower](https://github.com/TheAlgorithms/Python/blob/master/strings/lower.py)
@@ -967,6 +972,7 @@
967972
* [Fetch Jobs](https://github.com/TheAlgorithms/Python/blob/master/web_programming/fetch_jobs.py)
968973
* [Get Imdb Top 250 Movies Csv](https://github.com/TheAlgorithms/Python/blob/master/web_programming/get_imdb_top_250_movies_csv.py)
969974
* [Get Imdbtop](https://github.com/TheAlgorithms/Python/blob/master/web_programming/get_imdbtop.py)
975+
* [Giphy](https://github.com/TheAlgorithms/Python/blob/master/web_programming/giphy.py)
970976
* [Instagram Crawler](https://github.com/TheAlgorithms/Python/blob/master/web_programming/instagram_crawler.py)
971977
* [Instagram Pic](https://github.com/TheAlgorithms/Python/blob/master/web_programming/instagram_pic.py)
972978
* [Instagram Video](https://github.com/TheAlgorithms/Python/blob/master/web_programming/instagram_video.py)

conversions/length_conversions.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,7 @@ def length_conversion(value: float, from_type: str, to_type: str) -> float:
8181
0.1181103
8282
>>> length_conversion(4, "wrongUnit", "inch")
8383
Traceback (most recent call last):
84-
File "/usr/lib/python3.8/doctest.py", line 1336, in __run
85-
exec(compile(example.source, filename, "single",
86-
File "<doctest __main__.length_conversion[18]>", line 1, in <module>
87-
length_conversion(4, "wrongUnit", "inch")
88-
File "<string>", line 85, in length_conversion
84+
...
8985
ValueError: Invalid 'from_type' value: 'wrongUnit' Supported values are:
9086
meter, kilometer, feet, inch, centimeter, yard, foot, mile, millimeter
9187
"""

0 commit comments

Comments
 (0)