-
-
Notifications
You must be signed in to change notification settings - Fork 530
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This prevents Python 3.12 to complain that no test cases were run and to exit with cod e5 (which breaks maxi_cov).
- Loading branch information
Showing
2 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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 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,4 +1,30 @@ | ||
import unittest | ||
|
||
from websockets.extensions.base import * | ||
from websockets.frames import Frame, Opcode | ||
|
||
|
||
class ExtensionTests(unittest.TestCase): | ||
def test_encode(self): | ||
with self.assertRaises(NotImplementedError): | ||
Extension().encode(Frame(Opcode.TEXT, b"")) | ||
|
||
def test_decode(self): | ||
with self.assertRaises(NotImplementedError): | ||
Extension().decode(Frame(Opcode.TEXT, b"")) | ||
|
||
|
||
class ClientExtensionFactoryTests(unittest.TestCase): | ||
def test_get_request_params(self): | ||
with self.assertRaises(NotImplementedError): | ||
ClientExtensionFactory().get_request_params() | ||
|
||
def test_process_response_params(self): | ||
with self.assertRaises(NotImplementedError): | ||
ClientExtensionFactory().process_response_params([], []) | ||
|
||
|
||
# Abstract classes don't provide any behavior to test. | ||
class ServerExtensionFactoryTests(unittest.TestCase): | ||
def test_process_request_params(self): | ||
with self.assertRaises(NotImplementedError): | ||
ServerExtensionFactory().process_request_params([], []) |