public String getModuleName() {
return "com.google.collide.client.TestCode";
}
public void testScopes() {
MockAutocompleterEnvironment helper = new MockAutocompleterEnvironment();
String text = ""
+ "# Comment\n"
+ "class Foo:\n"
+ " \"Foo is very clever and open-minded\"\n"
+ " def goo(self, dwarf):\n"
+ " whatever = [\n"
+ "\"whenever\"\n"
+ " ]\n"
+ " # Fais ce que dois, advienne que pourra\n"
+ "\n"
+ " def roo(gnome):\n"
+ " self.this = def class\n"
+ " # La culture, c'est ce qui reste quand on a tout oublié.\n"
+ "class Bar:\n"
// Also test that different indention scheme works well.
+ " \"Bar is a unit of pressure, roughly equal to the atmospheric pressure on Earth\"\n"
+ " def far(self):\n"
+ " The kingdom of FAR FAR Away, Donkey? That's where we're going! FAR! FAR!... away.\n";
helper.setup(new PathUtil("foo.py"), text, 0, 0, true);
final PyIndexUpdater analyzer = new PyIndexUpdater();
helper.parser.getListenerRegistrar().add(new DocumentParser.Listener() {
private boolean asyncParsing;