Skip to content
This repository has been archived by the owner on May 31, 2020. It is now read-only.

Pass tests on Windows #72

Merged
merged 4 commits into from
May 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion docs/internals/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ instead of using the official PyBee repository, you'll be using your own
Github fork.

As with the getting started guide, these instructions will assume that you
have Python 3, and have virtualenv available for use.
have Python 3.4, and have virtualenv available for use.

Start by forking Batavia into your own Github repository; then
check out your fork to your own computer into a development directory:
Expand Down Expand Up @@ -56,6 +56,16 @@ Alternatively, you can download the PhantomJS tarball, and put the

.. _Homebrew: http://brew.sh

Windows
~~~

[Download PhantomJS](http://phantomjs.org/download.html) and extract the .exe
file into your GitHub repository.

On Windows, Batavia also needs the GNU "make" utility, which you can find
[here](http://www.equation.com/servlet/equation.cmd?fa=make). This should
likewise be extracted into your GitHub repository or somewhere in your PATH.

Ubuntu
~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion docs/intro/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Getting Started
===============

In this guide we will walk you through setting up your Batavia environment for
development and testing. We will assume that you have a working Python 3,
development and testing. We will assume that you have a working Python 3.4,
and use virtualenv.

Get a copy of Batavia
Expand Down
8 changes: 4 additions & 4 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def sendPhantomCommand(phantomjs, payload=None, output=None, success=None, on_fa
if ch == '\n':
# print(">>>", out[-1])
out.append("")
else:
elif ch != '\r':
out[-1] += ch
except IOError:
continue
Expand Down Expand Up @@ -300,7 +300,7 @@ def runAsJavaScript(test_dir, main_code, extra_code=None, js=None, run_in_functi
)
sendPhantomCommand(
_phantomjs,
"page.injectJs('%s')" % os.path.join('temp', 'modules.js'),
"page.injectJs('%s')" % 'temp/modules.js',
success=['true', '{}'],
on_fail="Unable to inject modules"
)
Expand All @@ -310,7 +310,7 @@ def runAsJavaScript(test_dir, main_code, extra_code=None, js=None, run_in_functi
for mod, payload in sorted(js.items()):
sendPhantomCommand(
_phantomjs,
"page.injectJs('%s.js')" % os.path.join('temp', mod),
"page.injectJs('%s.js')" % "/".join(('temp', mod)),
output=output,
success=['true', '{}'],
on_fail="Unable to inject native module %s" % mod
Expand Down Expand Up @@ -347,7 +347,7 @@ def runAsJavaScript(test_dir, main_code, extra_code=None, js=None, run_in_functi
PYTHON_STACK = re.compile(' File "(?P<file>.*)", line (?P<line>\d+), in .*\r?\n .*\r?\n')
PYTHON_FLOAT = re.compile('(\d+)e(-)?0?(\d+)')

MEMORY_REFERENCE = re.compile('0x[\dabcdef]{4,12}')
MEMORY_REFERENCE = re.compile('0x[\dABCDEFabcdef]{4,16}')


def cleanse_javascript(input):
Expand Down