-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Work on automatic label generation (#6)
* add * Update paths.py * lets see * Revert "lets see" This reverts commit 7633fac. * Revert "Revert "lets see"" This reverts commit 5238e6a. * Update paths.py * Update paths.py * add * Update guess_label_size.py add Update guess_label_size.py Update guess_label_size.py Update guess_label_size.py add * Update guess_label_size.py add Update guess_label_size.py Update guess_label_size.py Update guess_label_size.py add * Update paths.py * Update paths.py * Update paths.py * Update paths.py * Update paths.py * Update paths.py * Update paths.py Update paths.py * Update paths.py * Update paths.py * Update paths.py * add add Update test_label_generation.py
- Loading branch information
1 parent
518ef2d
commit 871f742
Showing
8 changed files
with
211 additions
and
122 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,13 @@ | ||
from django_ltree.paths import PathGenerator | ||
|
||
|
||
def test_label_generation(): | ||
assert PathGenerator.guess_the_label_size(62, 62) == 2 | ||
assert PathGenerator.guess_the_label_size(0, 62) == 1 | ||
|
||
|
||
def test_automatic_name_creation(): | ||
from taxonomy.models import Taxonomy | ||
|
||
for i in range(0, 1000): | ||
Taxonomy.objects.create_child(name=i) |
Empty file.
Oops, something went wrong.