Skip to content

Commit e198129

Browse files
committed
Merge branch 'feature/quotes' into develop
2 parents 271663d + bbff162 commit e198129

13 files changed

+54
-54
lines changed

python-algorithm/algorithm/greedy/test/test_cashier_change.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
from algorithm.greedy.cashier_change import cashier_change
44

55

6-
@pytest.mark.benchmark(group="cashier_change")
6+
@pytest.mark.benchmark(group='cashier_change')
77
@pytest.mark.parametrize(
8-
argnames="denominations, price, expected",
8+
argnames='denominations, price, expected',
99
argvalues=[
1010
([25, 10, 5, 1], 30, 2),
1111
([25, 10, 5, 1], 24, 6)
1212
],
13-
ids=["case1", "case2"])
13+
ids=['case1', 'case2'])
1414
def test_cashier_change(benchmark, denominations, price, expected):
1515
result = benchmark(cashier_change, denominations, price)
1616
assert expected == result

python-algorithm/algorithm/greedy/test/test_interval_schedule.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
'end': time.strptime('2022-07-25 12:00:00', '%Y-%m-%d %H:%M:%S')}
1616

1717

18-
@pytest.mark.benchmark(group="interval_scheduling_lecture")
18+
@pytest.mark.benchmark(group='interval_scheduling_lecture')
1919
@pytest.mark.parametrize(
20-
argnames="lectures, expected",
20+
argnames='lectures, expected',
2121
argvalues=[([lecture1, lecture2, lecture3], [lecture2, lecture3])],
22-
ids=["case1"])
22+
ids=['case1'])
2323
def test_interval_scheduling_lecture(benchmark, lectures, expected):
2424
result = benchmark(interval_scheduling_lecture, lectures)
2525
assert expected == result

python-algorithm/algorithm/math/test/test_addition_integer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
from algorithm.math.binary_operation import addition_binary_number
44

55

6-
@pytest.mark.benchmark(group="addition_of_binary_number")
6+
@pytest.mark.benchmark(group='addition_of_binary_number')
77
@pytest.mark.parametrize(
8-
argnames="a, b, expected",
8+
argnames='a, b, expected',
99
argvalues=[('1110', '1011', '11001')],
10-
ids=["case1"])
10+
ids=['case1'])
1111
def test_addition_of_binary_number(benchmark, a, b, expected):
1212
result = benchmark(addition_binary_number, a, b)
1313
assert expected == result

python-algorithm/algorithm/math/test/test_base_expansion.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
from algorithm.math.base_expansion import base_expansion
44

55

6-
@pytest.mark.benchmark(group="base_expansion")
6+
@pytest.mark.benchmark(group='base_expansion')
77
@pytest.mark.parametrize(
8-
argnames="number, base, expected",
8+
argnames='number, base, expected',
99
argvalues=[
1010
(12345, 8, '30071'),
1111
(177130, 16, '2B3EA'),
1212
(241, 2, '11110001')
1313
],
14-
ids=["base8", "base16", "base2"])
14+
ids=['base8', 'base16', 'base2'])
1515
def test_base_expansion(benchmark, number, base, expected):
1616
result = benchmark(base_expansion, number, base)
1717
assert expected == result

python-algorithm/algorithm/math/test/test_greatest_common_divisor.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
from algorithm.math.greatest_common_divisor import gcd_euclidean, gcd_euclidean_divmod, gcd_extended_euclidean
44

55

6-
@pytest.mark.benchmark(group="gcd_euclidean")
6+
@pytest.mark.benchmark(group='gcd_euclidean')
77
@pytest.mark.parametrize(
8-
argnames="pair, expected",
8+
argnames='pair, expected',
99
argvalues=[
1010
((24, 36), 12),
1111
((17, 22), 1),
@@ -17,9 +17,9 @@ def test_gcd_euclidean(benchmark, pair, expected):
1717
assert expected == result
1818

1919

20-
@pytest.mark.benchmark(group="gcd_euclidean_divmod")
20+
@pytest.mark.benchmark(group='gcd_euclidean_divmod')
2121
@pytest.mark.parametrize(
22-
argnames="pair, expected",
22+
argnames='pair, expected',
2323
argvalues=[
2424
((24, 36), 12),
2525
((17, 22), 1),
@@ -31,9 +31,9 @@ def test_gcd_euclidean_divmod(benchmark, pair, expected):
3131
assert expected == result
3232

3333

34-
@pytest.mark.benchmark(group="gcd_extended_euclidean")
34+
@pytest.mark.benchmark(group='gcd_extended_euclidean')
3535
@pytest.mark.parametrize(
36-
argnames="pair, expected",
36+
argnames='pair, expected',
3737
argvalues=[
3838
((24, 36), (12, -1, 1)),
3939
((17, 22), (1, -9, 7)),

python-algorithm/algorithm/math/test/test_least_common_multiple.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
from algorithm.math.least_common_multiple import lcm
44

55

6-
@pytest.mark.benchmark(group="lcm")
6+
@pytest.mark.benchmark(group='lcm')
77
@pytest.mark.parametrize(
8-
argnames="pair, expected",
8+
argnames='pair, expected',
99
argvalues=[
1010
((24, 36), 72),
1111
((17, 22), 374),

python-algorithm/algorithm/math/test/test_matrix_multiplication.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@
88
matrix_ab = np.array([[22, 28], [49, 64]])
99

1010

11-
@pytest.mark.benchmark(group="matrix_multiplication")
11+
@pytest.mark.benchmark(group='matrix_multiplication')
1212
@pytest.mark.parametrize(
13-
argnames="a, b, expected",
13+
argnames='a, b, expected',
1414
argvalues=[(matrix_a, matrix_b, matrix_ab)],
15-
ids=["multiply_matrix"])
15+
ids=['multiply_matrix'])
1616
def test_matrix_multiplication1(benchmark, a, b, expected):
1717
result = benchmark(multiply_matrix, a, b)
1818
assert np.array_equal(expected, result)
1919

2020

21-
@pytest.mark.benchmark(group="matrix_multiplication")
21+
@pytest.mark.benchmark(group='matrix_multiplication')
2222
@pytest.mark.parametrize(
23-
argnames="a, b, expected",
23+
argnames='a, b, expected',
2424
argvalues=[(matrix_a, matrix_b, matrix_ab)],
25-
ids=["np.dot"])
25+
ids=['np.dot'])
2626
def test_matrix_multiplication2(benchmark, a, b, expected):
2727
result = benchmark(np.dot, a, b)
2828
assert np.array_equal(expected, result)

python-algorithm/algorithm/search/generic_search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import TypeVar, Iterable, Tuple, List, Sequence
22

33
T = TypeVar('T')
4-
C = TypeVar("C", bound="Comparable")
4+
C = TypeVar('C', bound='Comparable')
55

66

77
def generic_linear_contains(iterable: Iterable[T], key: T) -> bool:

python-algorithm/algorithm/search/test/test_binary_search.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
from algorithm.search.binary_search import binary_search
44

55

6-
@pytest.mark.benchmark(group="binary_search")
6+
@pytest.mark.benchmark(group='binary_search')
77
@pytest.mark.parametrize(
8-
argnames="sequence, target, expected",
8+
argnames='sequence, target, expected',
99
argvalues=[
1010
([1, 2, 3, 4, 5], 5, 4),
1111
([1, 2, 3, 4, 5], 6, -1)
1212
],
13-
ids=["case1", "case2"])
13+
ids=['case1', 'case2'])
1414
def test_binary_search(benchmark, sequence, target, expected):
1515
result = benchmark(binary_search, sequence, target)
1616
assert expected == result

python-algorithm/algorithm/search/test/test_dna_search.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,35 @@
22
from algorithm.search.dna_search import Nucleotide, string_to_gene, linear_contains, binary_contains
33

44

5-
@pytest.mark.benchmark(group="linear_contains")
5+
@pytest.mark.benchmark(group='linear_contains')
66
@pytest.mark.parametrize(
7-
argnames="gene, key_codon, expected",
7+
argnames='gene, key_codon, expected',
88
argvalues=[
9-
(string_to_gene("ACGTGGCTCTCTAACGTACGTACGTACGGGGTTTATATATACCCTAGGACTCCCTTT"),
9+
(string_to_gene('ACGTGGCTCTCTAACGTACGTACGTACGGGGTTTATATATACCCTAGGACTCCCTTT'),
1010
(Nucleotide.A, Nucleotide.C, Nucleotide.G),
1111
True),
12-
(string_to_gene("ACGTGGCTCTCTAACGTACGTACGTACGGGGTTTATATATACCCTAGGACTCCCTTT"),
12+
(string_to_gene('ACGTGGCTCTCTAACGTACGTACGTACGGGGTTTATATATACCCTAGGACTCCCTTT'),
1313
(Nucleotide.G, Nucleotide.A, Nucleotide.T),
1414
False),
1515
],
16-
ids=["found", "not_found"])
16+
ids=['found', 'not_found'])
1717
def test_linear_contains(benchmark, gene, key_codon, expected):
1818
result = benchmark(linear_contains, gene, key_codon)
1919
assert expected == result
2020

2121

22-
@pytest.mark.benchmark(group="binary_contains")
22+
@pytest.mark.benchmark(group='binary_contains')
2323
@pytest.mark.parametrize(
24-
argnames="gene, key_codon, expected",
24+
argnames='gene, key_codon, expected',
2525
argvalues=[
26-
(sorted(string_to_gene("ACGTGGCTCTCTAACGTACGTACGTACGGGGTTTATATATACCCTAGGACTCCCTTT")),
26+
(sorted(string_to_gene('ACGTGGCTCTCTAACGTACGTACGTACGGGGTTTATATATACCCTAGGACTCCCTTT')),
2727
(Nucleotide.A, Nucleotide.C, Nucleotide.G),
2828
True),
29-
(sorted(string_to_gene("ACGTGGCTCTCTAACGTACGTACGTACGGGGTTTATATATACCCTAGGACTCCCTTT")),
29+
(sorted(string_to_gene('ACGTGGCTCTCTAACGTACGTACGTACGGGGTTTATATATACCCTAGGACTCCCTTT')),
3030
(Nucleotide.G, Nucleotide.A, Nucleotide.T),
3131
False),
3232
],
33-
ids=["found", "not_found"])
33+
ids=['found', 'not_found'])
3434
def test_binary_contains(benchmark, gene, key_codon, expected):
3535
result = benchmark(binary_contains, gene, key_codon)
3636
assert expected == result

0 commit comments

Comments
 (0)