-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
811b5e9
commit d1f2cae
Showing
21 changed files
with
537 additions
and
189 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
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
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,5 +1,4 @@ | ||
import unittest | ||
|
||
from datastax.Nodes import Node, DoublyNode | ||
|
||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import unittest | ||
from datastax.Nodes import ThreadedNode | ||
|
||
|
||
class TestThreadedNode(unittest.TestCase): | ||
|
||
def _test_string(self): | ||
result = \ | ||
' \n' \ | ||
'│ 1 │\n' \ | ||
'└───┴───┘\n' | ||
self.assertEqual(str(ThreadedNode(1)), result) | ||
result = \ | ||
' \n' \ | ||
'│ 12 │\n' \ | ||
'└───┴───┘\n' | ||
self.assertEqual(str(ThreadedNode(12)), result) | ||
result = \ | ||
' \n' \ | ||
'│ 123 │\n' \ | ||
'└────┴────┘\n' | ||
self.assertEqual(str(ThreadedNode(123)), result) | ||
|
||
def _test_string_with_left(self): | ||
result = \ | ||
(' \n' | ||
' 1 │\n' | ||
'┌───┴───┘\n' | ||
'20') | ||
self.assertEqual(str(ThreadedNode(1, ThreadedNode(20))), result) | ||
# result = \ | ||
# ' \n' \ | ||
# '│ 12 │\n' \ | ||
# '└───┴───┘\n' | ||
# self.assertEqual(str(ThreadedNode(12)), result) | ||
# result = \ | ||
# ' \n' \ | ||
# '│ 123 │\n' \ | ||
# '└────┴────┘\n' | ||
# self.assertEqual(str(ThreadedNode(123)), result) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
Oops, something went wrong.