Skip to content

Commit a5f2019

Browse files
committed
initial import test
1 parent be3e206 commit a5f2019

File tree

6 files changed

+44
-2
lines changed

6 files changed

+44
-2
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
envs/
1+
__pycache__/
2+
_artifacts/
23
*.egg-info
34
build/
5+
envs/
46
lib/
5-
__pycache__/

anaconda-project.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ commands:
2323
&& black src setup.py
2424
env_spec: rfjl37
2525

26+
atest:
27+
unix: python -m atest.run
28+
env_spec: rfjl37
29+
30+
2631
env_specs:
2732
robotframework-jupyterlibrary:
2833
packages:

src/JupyterLibrary/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
from ._version import __version__ # noqa
2+
from .core import JupyterLibrary # noqa

src/JupyterLibrary/core.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
from SeleniumLibrary import SeleniumLibrary
2+
3+
from .keywords import (
4+
server,
5+
)
6+
7+
8+
class JupyterLibrary(SeleniumLibrary):
9+
"""JupyterLibrary is a Jupyter testing library for Robot Framework."""
10+
def __init__(self, timeout=5.0, implicit_wait=0.0,
11+
run_on_failure='Capture Page Screenshot',
12+
screenshot_root_directory=None):
13+
"""JupyterLibrary can be imported with several optional arguments.
14+
- ``timeout``:
15+
Default value for `timeouts` used with ``Wait ...`` keywords.
16+
- ``implicit_wait``:
17+
Default value for `implicit wait` used when locating elements.
18+
- ``run_on_failure``:
19+
Default action for the `run-on-failure functionality`.
20+
- ``screenshot_root_directory``:
21+
Location where possible screenshots are created. If not given,
22+
the directory where the log file is written is used.
23+
"""
24+
super(JupyterLibrary, self).__init__(
25+
timeout=5.0,
26+
implicit_wait=0.0,
27+
run_on_failure="Capture Page Screenshot",
28+
screenshot_root_directory=None
29+
)
30+
self.add_library_components([
31+
server
32+
])

src/JupyterLibrary/keywords/__init__.py

Whitespace-only changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class ServerKeywords(object):
2+
def start_jupyter_notebook_server():
3+
pass

0 commit comments

Comments
 (0)