sgzwiz / brython

Automatically exported from code.google.com/p/brython
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Regression: script is called twice in release 20130217 #79

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta charset="iso-8859-1">
<script src="../brython.js"></script>
<script type="text/javascript">
    var count = 1;
</script>
</head>
<body onLoad="brython()">
<script type="text/python">
count = count +1
assert count ==2
print('OK, count is 2 : %d'%count)
</script>
</body>
</html>

What is the expected output? What do you see instead?
OK, count is 2 : 2

instead we get this line plus an assertion error
OK, count is 2 : 2
AssertionError:  @ 
file:///home/carlo/Dropbox/Android/work/brytest/brython.js:3690

or if comment the assert line:
OK, count is 2 : 2
OK, count is 2 : 3

What version of the product are you using? On what operating system?
Brython version 1.1.20130217-084411
Linux Mint 14

Please provide any additional information below.
works fine in Brython version 1.0.20130214-215612

Original issue reported on code.google.com by ca...@nce.ufrj.br on 17 Feb 2013 at 12:50

GoogleCodeExporter commented 9 years ago
There was a bug in today's release, causing Python scripts to be run twice
Fixed in the latest release 1.1.20130217-202258

Original comment by pierre.q...@gmail.com on 17 Feb 2013 at 7:56