mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-30 16:31:08 +00:00
refactor: move import pytest line of blockchain algs under "main" section. (#2012)
* change doctest line import doctest is not relevant with algorithms. move it under main section. * from doctest import testmod * refactor: move doctest under "main" section * Update diophantine_equation.py * Update modular_division.py Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
parent
1c62bd10c1
commit
c906ba82f3
|
@ -118,10 +118,9 @@ def extended_gcd(a, b):
|
||||||
return (d, x, y)
|
return (d, x, y)
|
||||||
|
|
||||||
|
|
||||||
# import testmod for testing our function
|
|
||||||
from doctest import testmod
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
from doctest import testmod
|
||||||
|
|
||||||
testmod(name="diophantine", verbose=True)
|
testmod(name="diophantine", verbose=True)
|
||||||
testmod(name="diophantine_all_soln", verbose=True)
|
testmod(name="diophantine_all_soln", verbose=True)
|
||||||
testmod(name="extended_gcd", verbose=True)
|
testmod(name="extended_gcd", verbose=True)
|
||||||
|
|
|
@ -139,10 +139,9 @@ def greatest_common_divisor(a, b):
|
||||||
return b
|
return b
|
||||||
|
|
||||||
|
|
||||||
# Import testmod for testing our function
|
|
||||||
from doctest import testmod
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
from doctest import testmod
|
||||||
|
|
||||||
testmod(name="modular_division", verbose=True)
|
testmod(name="modular_division", verbose=True)
|
||||||
testmod(name="modular_division2", verbose=True)
|
testmod(name="modular_division2", verbose=True)
|
||||||
testmod(name="invert_modulo", verbose=True)
|
testmod(name="invert_modulo", verbose=True)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user