예제 #1
0
        protected override IEnumerable <TestInfo> GetTests()
        {
            var testDir  = Path.Combine("Src", "StdLib", "Lib", "test");
            var fullPath = Path.Combine(CaseExecuter.FindRoot(), testDir);

            return(STDTESTS.Select(test => new TestInfo(Path.GetFullPath(Path.Combine(fullPath, test) + ".py"), category, testDir, this.manifest)));
        }
예제 #2
0
        protected override IEnumerable <TestInfo> GetTests()
        {
            string stdlib = Path.Combine(CaseExecuter.FindRoot(), "Src", "StdLib", "Lib", "ctypes", "test");

            return(Directory.GetFiles(stdlib, "test_*.py", SearchOption.AllDirectories)
                   .Select(file => new TestInfo(Path.GetFullPath(file), this.manifest))
                   .OrderBy(testcase => testcase.Name));
        }
예제 #3
0
        protected override IEnumerable <TestInfo> GetTests()
        {
            string stdlib = Path.Combine(CaseExecuter.FindRoot(), "Src", "StdLib", "Lib", "test");

            return(Directory.GetFiles(stdlib, "test_*.py", SearchOption.AllDirectories)
                   .Where(file => !StandardCPythonCaseGenerator.STDTESTS.Contains(Path.GetFileNameWithoutExtension(file)))
                   .Select(file => new TestInfo(Path.GetFullPath(file), this.manifest))
                   .OrderBy(testcase => testcase.Name));
        }
예제 #4
0
        protected override IEnumerable <TestInfo> GetTests()
        {
            var testDir  = Path.Combine("Src", "StdLib", "Lib", "ctypes", "test");
            var fullPath = Path.Combine(CaseExecuter.FindRoot(), testDir);

            return(Directory.EnumerateFiles(fullPath, "test_*.py", SearchOption.AllDirectories)
                   .Select(file => new TestInfo(Path.GetFullPath(file), category, testDir, this.manifest))
                   .OrderBy(testcase => testcase.Name));
        }
예제 #5
0
        private static string GetName(string path, string baseName, string rootDir)
        {
            var root = CaseExecuter.FindRoot();
            var dir  = System.IO.Path.GetDirectoryName(path).Replace(root, string.Empty).Replace(rootDir, string.Empty).Replace('\\', '.').Replace('/', '.').TrimStart('.');

            if (string.IsNullOrWhiteSpace(dir))
            {
                return($"{baseName}.{System.IO.Path.GetFileNameWithoutExtension(path)}");
            }
            return($"{baseName}.{dir}.{System.IO.Path.GetFileNameWithoutExtension(path)}");
        }
예제 #6
0
        protected override IEnumerable <TestInfo> GetTests()
        {
            var root = CaseExecuter.FindRoot();

            return(GetFilenames()
                   .Select(file => new TestInfo(Path.GetFullPath(file), category, "Tests", this.manifest))
                   .OrderBy(testcase => testcase.Name));

            IEnumerable <string> GetFilenames()
            {
                foreach (var filename in Directory.EnumerateFiles(Path.Combine(root, "Tests"), "test_*.py", SearchOption.AllDirectories))
                {
                    yield return(filename);
                }

                yield return(Path.Combine(root, "Src", "Scripts", "test_cgcheck.py"));
            }
        }
예제 #7
0
        protected override IEnumerable <TestInfo> GetTests()
        {
            return(GetFilenames(new[] {
                System.Tuple.Create(category, Path.Combine("Tests")),
                System.Tuple.Create($"{category}.scripts", Path.Combine("Src", "Scripts")),
            })
                   .OrderBy(testcase => testcase.Name));

            IEnumerable <TestInfo> GetFilenames(IEnumerable <System.Tuple <string, string> > folders)
            {
                foreach (var tuple in folders)
                {
                    var fullPath = Path.Combine(CaseExecuter.FindRoot(), tuple.Item2);
                    foreach (var filename in Directory.EnumerateFiles(fullPath, "test_*.py", SearchOption.AllDirectories))
                    {
                        yield return(new TestInfo(Path.GetFullPath(filename), tuple.Item1, tuple.Item2, manifest));
                    }
                }
            }
        }
예제 #8
0
 public void FixtureSetUp()
 {
     this.executor = new CaseExecuter();
 }
예제 #9
0
        protected override IEnumerable <TestInfo> GetTests()
        {
            string stdlib = Path.Combine(CaseExecuter.FindRoot(), "Src", "StdLib", "Lib", "test");

            return(STDTESTS.Select(test => new TestInfo(Path.GetFullPath(Path.Combine(stdlib, test) + ".py"), this.manifest)));
        }
예제 #10
0
 protected override IEnumerable <TestInfo> GetTests()
 {
     return(Directory.EnumerateFiles(Path.Combine(CaseExecuter.FindRoot(), "Tests"), "test_*.py", SearchOption.AllDirectories)
            .Select(file => new TestInfo(Path.GetFullPath(file), this.manifest))
            .OrderBy(testcase => testcase.Name));
 }