Пример #1
0
 def testCanBeCompared(self):
     with tempfile.TemporaryDirectory() as tmp:
         f = os.path.join(tmp, 'foo.fsproj')
         touch(f)
         fs_project_1 = FSharpProjectFile.from_path(f)
         fs_project_2 = FSharpProjectFile.from_path(f)
         self.assertEquals(fs_project_1, fs_project_2)
 def testCanBeCompared(self):
     with tempfile.TemporaryDirectory() as tmp:
         f = os.path.join (tmp, 'foo.fsproj')
         touch (f)
         fs_project_1 = FSharpProjectFile.from_path(f)
         fs_project_2 = FSharpProjectFile.from_path(f)
         self.assertEquals(fs_project_1, fs_project_2)
Пример #3
0
 def testCanDetectScriptFile(self):
     with tempfile.TemporaryDirectory() as tmp:
         f = os.path.join(tmp, 'foo.fsx')
         touch(f)
         v = self.win.open_file(f)
         time.sleep(0.01)
         file_info = FileInfo(v)
         self.assertTrue(file_info.is_fsharp_script_file)
Пример #4
0
 def test_governs_SameLevel(self):
     with tempfile.TemporaryDirectory() as tmp:
         f = os.path.join(tmp, 'foo.fsproj')
         f2 = os.path.join(tmp, 'foo.fs')
         touch(f)
         touch(f2)
         fs_proj = FSharpProjectFile.from_path(f)
         self.assertTrue(fs_proj.governs(f2))
 def testCanDetectScriptFile(self):
     with tempfile.TemporaryDirectory() as tmp:
         f = os.path.join (tmp, 'foo.fsx')
         touch (f)
         v = self.win.open_file(f)
         time.sleep(0.01)
         file_info = FileInfo(v)
         self.assertTrue (file_info.is_fsharp_script_file)
 def test_governs_SameLevel(self):
     with tempfile.TemporaryDirectory() as tmp:
         f = os.path.join (tmp, 'foo.fsproj')
         f2 = os.path.join (tmp, 'foo.fs')
         touch (f)
         touch (f2)
         fs_proj = FSharpProjectFile.from_path(f)
         self.assertTrue(fs_proj.governs (f2))
Пример #7
0
 def testCanReturnParent(self):
     with tempfile.TemporaryDirectory() as tmp:
         f = os.path.join(tmp, 'foo.fsproj')
         touch(f)
         fs_project = FSharpProjectFile.from_path(f)
         self.assertEquals(fs_project.parent, tmp)
Пример #8
0
 def testCanCreateFromPath(self):
     with tempfile.TemporaryDirectory() as tmp:
         f = os.path.join(tmp, 'foo.fsproj')
         touch(f)
         fs_project = FSharpProjectFile.from_path(f)
         self.assertEquals(fs_project.path, f)
Пример #9
0
 def testCanFind(self):
     with make_directories([["foo", "bar", "baz"]]) as tmp_root:
         fs_proj_file = os.path.join(tmp_root, 'hey.fsproj')
         touch(fs_proj_file)
         found = find_fsproject(os.path.join(tmp_root, 'foo/bar/baz'))
         self.assertEquals(found, fs_proj_file)
 def testCanReturnParent(self):
     with tempfile.TemporaryDirectory() as tmp:
         f = os.path.join (tmp, 'foo.fsproj')
         touch (f)
         fs_project = FSharpProjectFile.from_path(f)
         self.assertEquals(fs_project.parent, tmp)
 def testCanCreateFromPath(self):
     with tempfile.TemporaryDirectory() as tmp:
         f = os.path.join (tmp, 'foo.fsproj')
         touch (f)
         fs_project = FSharpProjectFile.from_path(f)
         self.assertEquals(fs_project.path, f)
 def testCanFind(self):
     with make_directories([["foo", "bar", "baz"]]) as tmp_root:
         fs_proj_file = os.path.join(tmp_root, 'hey.fsproj')
         touch(fs_proj_file)
         found = find_fsproject (os.path.join(tmp_root, 'foo/bar/baz'))
         self.assertEquals(found, fs_proj_file)