Skip to content

Commit e6eaa07

Browse files
authored
Pytest the entire repo (#980)
* Pytest the entire repo * Do each directory for now... * YAML files hate tabs * Add more requirements * pip install opencv-python * Comment out FTP * Add pandas and sklearn to requirements * Comment out FTP, graphs, machine_learning, maths, neural_network, project_euler * Update .travis.yml * Comment out Data structures * if __name__ == "__main__": * pytest --ignore= * pytest . * Update .travis.yml * pytest . --doctest-modules --ignore=${IGNORE} * Ignore --ignore because it just hangs
1 parent c85312d commit e6eaa07

File tree

3 files changed

+31
-3
lines changed

3 files changed

+31
-3
lines changed

.travis.yml

+23-1
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,35 @@ language: python
22
dist: xenial # required for Python >= 3.7
33
python: 3.7
44
cache: pip
5+
before_install: pip install --upgrade pip setuptools
56
install: pip install -r requirements.txt
67
before_script:
78
- black --check . || true
89
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
910
script:
1011
- mypy --ignore-missing-imports .
11-
- pytest --doctest-modules ./ciphers ./other ./searches ./sorts ./strings
12+
#- IGNORE="data_structures,file_transfer_protocol,graphs,machine_learning,maths,neural_network,project_euler"
13+
#- pytest . --doctest-modules --ignore=${IGNORE}
14+
- pytest --doctest-modules
15+
arithmetic_analysis
16+
backtracking
17+
boolean_algebra
18+
ciphers
19+
compression
20+
conversions
21+
digital_image_processing
22+
divide_and_conquer
23+
dynamic_programming
24+
hashes
25+
linear_algebra_python
26+
matrix
27+
networking_flow
28+
other
29+
searches
30+
sorts
31+
strings
32+
traversals
33+
1234
after_success:
1335
- python ./~script.py
1436
- cat DIRECTORY.md

dynamic_programming/longest_increasing_subsequence_O(nlogn).py

+3-2
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,6 @@ def LongestIncreasingSubsequenceLength(v):
3737
return length
3838

3939

40-
v = [2, 5, 3, 7, 11, 8, 10, 13, 6]
41-
print(LongestIncreasingSubsequenceLength(v))
40+
if __name__ == "__main__":
41+
v = [2, 5, 3, 7, 11, 8, 10, 13, 6]
42+
print(LongestIncreasingSubsequenceLength(v))

requirements.txt

+5
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,9 @@ flake8
33
matplotlib
44
mypy
55
numpy
6+
opencv-python
7+
pandas
68
pytest
9+
sklearn
10+
sympy
11+
tensorflow

0 commit comments

Comments
 (0)