-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use non-random cell ids in tests (#751)
* Use non-random cell ids in tests * Update CHANGELOG.md
- Loading branch information
Showing
3 changed files
with
27 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from nbformat.v4.nbbase import new_code_cell | ||
|
||
|
||
def test_cell_id_is_not_random(): | ||
id1 = new_code_cell().id | ||
id2 = new_code_cell().id | ||
|
||
n1 = int(id1.split("-")[1]) | ||
n2 = int(id2.split("-")[1]) | ||
assert n2 == n1 + 1 |