buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_convertpkg.py
equal
deleted
inserted
replaced
|
1 #============================================================================ |
|
2 #Name : test_ant.py |
|
3 #Part of : Helium |
|
4 |
|
5 #Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
6 #All rights reserved. |
|
7 #This component and the accompanying materials are made available |
|
8 #under the terms of the License "Eclipse Public License v1.0" |
|
9 #which accompanies this distribution, and is available |
|
10 #at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
11 # |
|
12 #Initial Contributors: |
|
13 #Nokia Corporation - initial contribution. |
|
14 # |
|
15 #Contributors: |
|
16 # |
|
17 #Description: |
|
18 #=============================================================================== |
|
19 |
|
20 """ convertpkg.py module tests. """ |
|
21 |
|
22 import tempfile |
|
23 import os |
|
24 |
|
25 def test_convertpkg(): |
|
26 import convertpkg |
|
27 tmpdir = tempfile.mkdtemp() |
|
28 |
|
29 (f_desc, pkgfile) = tempfile.mkstemp() |
|
30 f_file = os.fdopen(f_desc, 'w') |
|
31 f_file.write(r'"/sf/a.script"-"c:\a.script"' + '\n') |
|
32 f_file.close() |
|
33 |
|
34 convertpkg.convertpkg(pkgfile, tmpdir, 'tef') |
|
35 |
|
36 assert os.path.exists(os.path.join(tmpdir, 'bld.inf')) |
|
37 assert os.path.exists(os.path.join(tmpdir, '1', 'group', 'test.mmp')) |
|
38 |