~ubuntu-branches/ubuntu/maverick/pygame/maverick

« back to all changes in this revision

Viewing changes to test/image__save_gl_surface_test.py

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-01-14 17:02:11 UTC
  • mfrom: (1.3.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100114170211-21eop2ja7mr9vdcr
Tags: 1.9.1release-0ubuntu1
* New upstream version (lp: #433304)
* debian/control:
  - build-depends on libportmidi-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
import test_utils
2
 
import test.unittest as unittest
 
1
if __name__ == '__main__':
 
2
    import sys
 
3
    import os
 
4
    pkg_dir = os.path.split(os.path.abspath(__file__))[0]
 
5
    parent_dir, pkg_name = os.path.split(pkg_dir)
 
6
    is_pygame_pkg = (pkg_name == 'tests' and
 
7
                     os.path.split(parent_dir)[1] == 'pygame')
 
8
    if not is_pygame_pkg:
 
9
        sys.path.insert(0, parent_dir)
 
10
else:
 
11
    is_pygame_pkg = __name__.startswith('pygame.tests.')
3
12
 
 
13
if is_pygame_pkg:
 
14
    from pygame.tests import test_utils
 
15
    from pygame.tests.test_utils import unittest
 
16
else:
 
17
    from test import test_utils
 
18
    from test.test_utils import unittest
4
19
import pygame, os
5
20
from pygame.locals import *
6
21
 
33
48
        self.assert_(os.path.exists(tmp_file))
34
49
        
35
50
        os.remove(tmp_file)
36
 
        # os.rmdir(tmp_dir)
 
51
        
 
52
        # stops tonnes of tmp dirs building up in trunk dir
 
53
        os.rmdir(tmp_dir)
37
54
        
38
55
        
39
56
        pygame.display.quit()
40
57
if __name__ == '__main__': 
41
 
    unittest.main()
 
 
b'\\ No newline at end of file'
 
58
    unittest.main()