From fccc7d7420bc5ffe97cfc3c2da0cebc59828c3d4 Mon Sep 17 00:00:00 2001 From: Luis Rodriguez Date: Wed, 15 May 2019 08:32:06 -0700 Subject: [PATCH] Resolve notebook len duplicate method --- notebook/tests/selenium/test_dualmode_execute.py | 2 +- notebook/tests/selenium/utils.py | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/notebook/tests/selenium/test_dualmode_execute.py b/notebook/tests/selenium/test_dualmode_execute.py index e3cae9039..fc2d40cd4 100644 --- a/notebook/tests/selenium/test_dualmode_execute.py +++ b/notebook/tests/selenium/test_dualmode_execute.py @@ -76,6 +76,6 @@ def test_dualmode_execute(notebook): #Notebook will now have 8 cells, the index of the last cell will be 7 - assert notebook.get_cells_length() == 8 #Cells where added + assert len(notebook) == 8 #Cells where added notebook.focus_cell(7) validate_notebook_state(notebook, 'command', 7) diff --git a/notebook/tests/selenium/utils.py b/notebook/tests/selenium/utils.py index 89cd47aed..97478e4f0 100644 --- a/notebook/tests/selenium/utils.py +++ b/notebook/tests/selenium/utils.py @@ -226,10 +226,6 @@ class Notebook: JS = 'return Jupyter.notebook.get_cells().map(function(c) {return c.mode;})' return self.browser.execute_script(JS) - def get_cells_length(self): - JS = 'return IPython.notebook.get_cells().length;' - return self.browser.execute_script(JS) - def get_cell_type(self, index=0): JS = 'return Jupyter.notebook.get_cell({}).cell_type'.format(index) return self.browser.execute_script(JS)