Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit 4be0efc

Browse files
author
DEKHTIARJonathan
committed
[Benchmarking-Py] Restructure of PyTest
1 parent 48b6c03 commit 4be0efc

File tree

6 files changed

+15
-38
lines changed

6 files changed

+15
-38
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ variables.data*
138138

139139
# Local files
140140
/*.txt
141+
!requirements*.txt
142+
!pytest.ini
141143

142144
# Top Level Script Files
143-
/*.sh
145+
/*.sh

setup.cfg renamed to .style.yapf

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
[tool:pytest]
2-
minversion = 6.0
3-
addopts = -ra -q -s
4-
testpaths =
5-
tests
6-
7-
[yapf]
1+
[style]
82
based_on_style = google
93

104
# The number of columns to use for indentation.
@@ -60,4 +54,4 @@ arithmetic_precedence_indication = True
6054
no_spaces_around_selected_binary_operators = True
6155

6256
# Allow lambdas to be formatted on more than one line.
63-
allow_multiline_lambdas = True
57+
allow_multiline_lambdas = True

pytest.ini

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[pytest]
2+
minversion = 6.0
3+
addopts = -ra -q -s
4+
testpaths =
5+
tests

requirements-test.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pygments
2+
pytest
3+
yapf

setup.py

-27
This file was deleted.

tests/test_yapf_format.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def test_files_format(self):
5050
diff, changed = FormatCode(
5151
code,
5252
filename=file,
53-
style_config='setup.cfg',
53+
style_config='.style.yapf',
5454
print_diff=True
5555
)
5656

@@ -71,7 +71,7 @@ def test_files_format(self):
7171

7272
if self.badly_formatted_files:
7373
for filename in self.badly_formatted_files:
74-
str_err += f"yapf -i --style=setup.cfg {filename}\n"
74+
str_err += f"yapf -i --style=.style.yapf {filename}\n"
7575

7676
str_err = "\n======================================================================================\n" \
7777
f"Bad Coding Style: {len(self.badly_formatted_files)} file(s) need to be formatted, run the following commands to fix: \n" \

0 commit comments

Comments
 (0)