-
Notifications
You must be signed in to change notification settings - Fork 12.6k
server : replace behave with pytest #10416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
3acaf58
server : replace behave with pytest
ngxson 49cdfd3
fix test on windows
ngxson d7de413
misc
ngxson 3249aab
add more tests
ngxson f09a9b6
more tests
ngxson e34c9d7
styling
ngxson eb02373
log less, fix embd test
ngxson 472e128
added all sequential tests
ngxson 6af3f95
fix coding style
ngxson 1c2f0f7
fix save slot test
ngxson 78e3cb3
add parallel completion test
ngxson c432a82
fix parallel test
ngxson 58cbcd2
remove feature files
ngxson 3a504ae
Merge branch 'master' into xsn/server_pytest
ngxson 71fc0f1
update test docs
ngxson 217c9e4
no cache_prompt for some tests
ngxson 52c2625
add test_cache_vs_nocache_prompt
ngxson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ let | |
|
||
# server tests | ||
openai | ||
behave | ||
pytest | ||
prometheus-client | ||
]; | ||
in | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
.venv | ||
tmp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import pytest | ||
from utils import * | ||
|
||
|
||
# ref: https://stackoverflow.com/questions/22627659/run-code-before-and-after-each-test-in-py-test | ||
@pytest.fixture(autouse=True) | ||
def stop_server_after_each_test(): | ||
# do nothing before each test | ||
yield | ||
# stop all servers after each test | ||
instances = set( | ||
server_instances | ||
) # copy the set to prevent 'Set changed size during iteration' | ||
for server in instances: | ||
server.stop() |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.