Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
HELpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
HELpy
Commits
b0445fa2
Commit
b0445fa2
authored
4 weeks ago
by
Krzysztof Mochocki
Browse files
Options
Downloads
Patches
Plain Diff
Update way of generating generated_ test directories
parent
4ceeab8c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!80
Draft: Remove notifications
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/beekeepy_test/handle/commandline/application_command_line_options/patterns/config.ini
+1
-1
1 addition, 1 deletion
...line/application_command_line_options/patterns/config.ini
tests/conftest.py
+9
-7
9 additions, 7 deletions
tests/conftest.py
with
10 additions
and
8 deletions
tests/beekeepy_test/handle/commandline/application_command_line_options/patterns/config.ini
+
1
−
1
View file @
b0445fa2
# config automatically generated by helpy
# config automatically generated by helpy
wallet-dir
=
/workspace/h
ive
/tests/
python/functional/
beekeepy/handle/commandline/application_command_line_options/patterns
wallet-dir
=
/workspace/h
elpy
/tests/beekeepy
_test
/handle/commandline/application_command_line_options/patterns
unlock-timeout
=
900
unlock-timeout
=
900
unlock-interval
=
500
unlock-interval
=
500
webserver-http-endpoint
=
0.0.0.0:0
webserver-http-endpoint
=
0.0.0.0:0
...
...
This diff is collapsed.
Click to expand it.
tests/conftest.py
+
9
−
7
View file @
b0445fa2
...
@@ -30,12 +30,14 @@ def _convert_test_name_to_directory_name(test_name: str) -> str:
...
@@ -30,12 +30,14 @@ def _convert_test_name_to_directory_name(test_name: str) -> str:
@pytest.fixture
(
autouse
=
True
)
@pytest.fixture
(
autouse
=
True
)
def
working_directory
(
request
:
pytest
.
FixtureRequest
)
->
Path
:
def
working_directory
(
request
:
pytest
.
FixtureRequest
)
->
Path
:
name_of_directory
=
_convert_test_name_to_directory_name
(
request
.
node
.
name
)
name_of_directory
=
_convert_test_name_to_directory_name
(
request
.
node
.
name
)
path_to_generated
=
request
.
node
.
path
.
parent
/
name_of_directory
path_to_module_generated
=
request
.
node
.
path
.
parent
/
f
"
generated_
{
request
.
node
.
path
.
stem
}
"
if
path_to_generated
.
exists
():
path_to_module_generated
.
mkdir
(
exist_ok
=
True
)
shutil
.
rmtree
(
path_to_generated
)
path_to_test_artifacts
=
path_to_module_generated
/
name_of_directory
path_to_generated
.
mkdir
()
if
path_to_test_artifacts
.
exists
():
assert
isinstance
(
path_to_generated
,
Path
),
"
given object is not Path
"
shutil
.
rmtree
(
path_to_test_artifacts
)
return
path_to_generated
path_to_test_artifacts
.
mkdir
()
assert
isinstance
(
path_to_test_artifacts
,
Path
),
"
given object is not Path
"
return
path_to_test_artifacts
def
pytest_addoption
(
parser
:
pytest
.
Parser
)
->
None
:
def
pytest_addoption
(
parser
:
pytest
.
Parser
)
->
None
:
...
@@ -47,7 +49,7 @@ def pytest_addoption(parser: pytest.Parser) -> None:
...
@@ -47,7 +49,7 @@ def pytest_addoption(parser: pytest.Parser) -> None:
@pytest.fixture
@pytest.fixture
def
registered_apis
()
->
RegisteredApisT
:
def
registered_apis
()
->
RegisteredApisT
:
"""
Return registered methods.
"""
"""
Return registered methods.
"""
return
AbstractApi
.
_get_registered_methods
()
return
Abstract
Sync
Api
.
_get_registered_methods
()
@pytest.fixture
@pytest.fixture
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment