Skip to content

Commit d4797a8

Browse files
committed
Addressed a discrepency between article and code
1 parent a10703a commit d4797a8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

brython/unittest/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,28 @@
1919
def python_add(a, b):
2020
return a + b
2121

22-
window.python_add = python_add
22+
window.py_add = python_add
2323

2424
print("After python_add to JS")
2525
</script>
2626

2727
<script>
28-
const add = (a, b) => a + b;
28+
const js_add = (a, b) => a + b;
2929
QUnit.module('js_add_test', function() {
3030
QUnit.test('should add two numbers', function(assert) {
31-
assert.equal(add(1, 1), 2, '1 + 1 = 2');
31+
assert.equal(js_add(1, 1), 2, '1 + 1 = 2');
3232
});
3333
});
3434

3535
QUnit.module('py_add_test', function() {
3636
QUnit.test('should add two numbers in Brython', function(assert) {
37-
assert.equal(add(2, 3), 5, '2 + 3 = 5 (python)');
37+
assert.equal(py_add(2, 3), 5, '2 + 3 = 5 (python)');
3838
});
3939
});
4040

4141
QUnit.module('py_add_failed_test', function() {
4242
QUnit.test('should add two numbers in Brython (failure)', function(assert) {
43-
assert.equal(add(2, 3), 6, '2 + 3 != 6 (python)');
43+
assert.equal(py_add(2, 3), 6, '2 + 3 != 6 (python)');
4444
});
4545
});
4646

0 commit comments

Comments
 (0)