Skip to content

Commit d3b099a

Browse files
authored
Move tests (#1135)
1 parent e6989fc commit d3b099a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+5
-5
lines changed

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646

4747
- name: Run tests
4848
run: |
49-
python -m pytest -vs nglview/tests --cov=nglview --cov-report=html --disable-pytest-warnings
49+
python -m pytest -vs tests --cov=nglview --cov-report=html --disable-pytest-warnings
5050
5151
- name: Check installation with pip
5252
run: |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

nglview/tests/test_version.py tests/test_version.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import json
2-
import os
2+
from pathlib import Path
33

44
import nglview as nv
55

66

77
def test_make_sure_versions_matched():
8-
nglview_dir = os.path.join(os.path.dirname(__file__), '..')
8+
nglview_dir = Path(__file__).resolve().parent.parent / 'nglview'
99

1010
# frontend and backend
11-
nglview_js_widgets = os.path.join(nglview_dir, 'static', 'index.js')
12-
with open(nglview_js_widgets) as fh:
11+
nglview_js_widgets = nglview_dir / 'static' / 'index.js'
12+
with nglview_js_widgets.open() as fh:
1313
for line in fh:
1414
if '"name":"nglview-js-widgets"' in line:
1515
break
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)