You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.2 KiB
52 lines
1.2 KiB
// <file> |
|
// <copyright see="prj:///doc/copyright.txt"/> |
|
// <license see="prj:///doc/license.txt"/> |
|
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/> |
|
// <version>$Revision$</version> |
|
// </file> |
|
|
|
using System; |
|
using System.Text; |
|
using NUnit.Framework; |
|
using ICSharpCode.PythonBinding; |
|
|
|
namespace PythonBinding.Tests.Resolver |
|
{ |
|
/// <summary> |
|
/// Tests the standard Python module names can be determined |
|
/// from the IronPython assembly. |
|
/// </summary> |
|
[TestFixture] |
|
public class GetPythonModulesTestFixture |
|
{ |
|
string[] moduleNames; |
|
|
|
[TestFixtureSetUp] |
|
public void SetUpFixture() |
|
{ |
|
StandardPythonModules modules = new StandardPythonModules(); |
|
moduleNames = modules.GetNames(); |
|
} |
|
|
|
[Test] |
|
public void ContainsSysModuleName() |
|
{ |
|
Assert.Contains("sys", moduleNames); |
|
} |
|
|
|
[Test] |
|
public void ContainsBuiltInModule() |
|
{ |
|
Assert.Contains("__builtin__", moduleNames, "Module names: " + WriteArray(moduleNames)); |
|
} |
|
|
|
static string WriteArray(string[] items) |
|
{ |
|
StringBuilder text = new StringBuilder(); |
|
foreach (string item in items) { |
|
text.AppendLine(item); |
|
} |
|
return text.ToString(); |
|
} |
|
} |
|
}
|
|
|