Skip to content

Commit 3879ce6

Browse files
committed
we shouldn't be testing npm inside of pytests
1 parent ba5c704 commit 3879ce6

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

tests/python/test_dicts.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -367,14 +367,6 @@ def test_toLocaleString():
367367
pm.eval("(result, obj) => {result[0] = obj.toLocaleString()}")(result, items)
368368
assert result[0] == '[object Object]'
369369

370-
# repr
371-
372-
373-
def test_repr_max_recursion_depth():
374-
subprocess.check_call('npm install crypto-js', shell=True)
375-
CryptoJS = pm.require('crypto-js')
376-
assert str(CryptoJS).__contains__("{'lib': {'Base': {'extend':")
377-
378370

379371
# __class__
380372
def test___class__attribute():

tests/python/test_functions_this.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,6 @@ class Class:
126126
# require
127127

128128

129-
def test_require_correct_this():
130-
subprocess.check_call('npm install crypto-js', shell=True)
131-
CryptoJS = pm.require('crypto-js')
132-
cipher = CryptoJS.SHA256("Hello, World!").toString()
133-
assert cipher == "dffd6021bb2bd5b0af676290809ec3a53191dd81c7f70a4b28688a362182986f"
134-
subprocess.check_call('npm uninstall crypto-js', shell=True)
135-
136-
137129
def test_require_correct_this_old_style_class():
138130
example = pm.eval("""
139131
() => {
@@ -207,12 +199,12 @@ def pyFunc():
207199
def test_method_no_self():
208200
class What:
209201
def some_method():
210-
return 3
202+
return 3
211203

212204
obj = What()
213205

214206
try:
215207
pm.eval('x => x.some_method()')(obj)
216208
assert (False)
217209
except pm.SpiderMonkeyError as e:
218-
assert 'takes 0 positional arguments but 1 was given' in str(e)
210+
assert 'takes 0 positional arguments but 1 was given' in str(e)

0 commit comments

Comments
 (0)