-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[ty] Move server tests as integration tests #19522
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,11 +37,15 @@ thiserror = { workspace = true } | |
| tracing = { workspace = true } | ||
| tracing-subscriber = { workspace = true, features = ["chrono"] } | ||
|
|
||
| dunce = { workspace = true, optional = true } | ||
| insta = { workspace = true, features = ["filters", "json"], optional = true } | ||
| regex = { workspace = true , optional = true } | ||
| tempfile = { workspace = true , optional = true } | ||
|
|
||
| [features] | ||
| testing = ["dunce", "insta", "regex", "tempfile"] | ||
|
|
||
| [dev-dependencies] | ||
| dunce = { workspace = true } | ||
| insta = { workspace = true, features = ["filters", "json"] } | ||
| regex = { workspace = true } | ||
| tempfile = { workspace = true } | ||
|
|
||
|
Comment on lines
+41
to
+50
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is still required because we conditionally add the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we use
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That is not pretty ;)
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it? Isn't it almost the same as JSON (unless we add some manual implementations):
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would also be fine to simply always derive
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I think implementing |
||
| [target.'cfg(target_vendor = "apple")'.dependencies] | ||
| libc = { workspace = true } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ use lsp_server::Connection; | |
| use ruff_db::system::{OsSystem, SystemPathBuf}; | ||
|
|
||
| use crate::server::Server; | ||
| pub use crate::session::ClientOptions; | ||
|
Comment on lines
+7
to
+9
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are required by the mock server implementation. |
||
| pub use document::{NotebookDocument, PositionEncoding, TextDocument}; | ||
| pub(crate) use session::{DocumentQuery, Session}; | ||
|
|
||
|
|
@@ -14,7 +15,7 @@ mod server; | |
| mod session; | ||
| mod system; | ||
|
|
||
| #[cfg(test)] | ||
| #[cfg(feature = "testing")] | ||
| pub mod test; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would move this implementation into the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've pushed this change. I've moved the tests under |
||
|
|
||
| pub(crate) const SERVER_NAME: &str = "ty"; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.