Lets us work with the userUUID variable - functions don't close over module
vars:

```
$ python <<EOF
a = 4

def test1():
    global a
    a += 2

def test2():
    a = 9

def test3():
    a += 2

print a
test1()
print a
test2()
print a
test3()

EOF
```

```
4
6
6
Traceback (most recent call last):
  File "<stdin>", line 18, in <module>
  File "<stdin>", line 11, in test3
UnboundLocalError: local variable 'a' referenced before assignment
```


On Tue, Sep 3, 2013 at 2:04 PM, Justin Walgran <notifications@github.com>wrote:

> In opentreemap/uitests/basic.py:
>
> > +# PyVirtualDisplay
> > +userUUID = 1
> > +
> > +
> > +class LoginLogoutTest(TestCase):
> > +    def setUp(self):
> > +        self.driver = uitests.driver
> > +
> > +        self.user = self._create_test_user()
> > +        self.profile = RegistrationProfile.objects.create_profile(self.user)
> > +
> > +    def tearDown(self):
> > +        self.user.delete_with_user(User.system_user())
> > +
> > +    def _create_test_user(self):
> > +        global userUUID
>
> For my education, what does global do here?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/azavea/OTM2/pull/273/files#r6133046>
> .
>



-- 
Adam Hinz
Software Engineer, Azavea
hinz.adam@gmail.com | c: 608-445-8391 | Twitter: @ahinz