Permalink
Browse files

Unit test refresh broken in x64

123L syntax highlighting
  • Loading branch information...
pyscripter
pyscripter committed Mar 23, 2012
1 parent 21d9ea3 commit 7b5780549cd18e8b491461046e8996d6c692a75a
View
@@ -3,8 +3,8 @@
[Setup]
AppName=PyScripter
-AppVersion=2.5.2
-AppVerName=PyScripter 2.5.2
+AppVersion=2.5.3
+AppVerName=PyScripter 2.5.3
AppPublisher=PyScripter
AppPublisherURL=http://pyscripter.googlecode.com
AppSupportURL=http://groups.google.com/group/PyScripter
@@ -14,7 +14,7 @@ DefaultGroupName=PyScripter
InfoBeforeFile=BeforeInstallPyScripter.txt
InfoAfterFile=AfterInstallPyScripter.txt
OutputDir=Output
-OutputBaseFilename=PyScripter-v2.5.2-Setup
+OutputBaseFilename=PyScripter-v2.5.3-Setup
Compression=lzma
SolidCompression=true
ChangesAssociations=true
@@ -3,8 +3,8 @@
[Setup]
AppName=PyScripter
-AppVersion=2.5.2
-AppVerName=PyScripter 2.5.2
+AppVersion=2.5.3
+AppVerName=PyScripter 2.5.3
AppPublisher=PyScripter
AppPublisherURL=http://pyscripter.googlecode.com
AppSupportURL=http://groups.google.com/group/PyScripter
@@ -14,7 +14,7 @@ DefaultGroupName=PyScripter-x64
InfoBeforeFile=BeforeInstallPyScripter-x64.txt
InfoAfterFile=AfterInstallPyScripter-x64.txt
OutputDir=Output
-OutputBaseFilename=PyScripter-v2.5.2-x64-Setup
+OutputBaseFilename=PyScripter-v2.5.3-x64-Setup
Compression=lzma/Max
SolidCompression=true
ChangesAssociations=true
View
@@ -96,20 +96,20 @@
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
- <VerInfo_Release>2</VerInfo_Release>
+ <VerInfo_Release>3</VerInfo_Release>
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
<Debugger_RunParams>--PYTHON27</Debugger_RunParams>
- <VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=2.5.2.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
+ <VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=2.5.3.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<VerInfo_Locale>1033</VerInfo_Locale>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
- <VerInfo_Release>2</VerInfo_Release>
+ <VerInfo_Release>3</VerInfo_Release>
<Debugger_RunParams>--PYTHON27</Debugger_RunParams>
<ILINK_FullDebugInfo>true</ILINK_FullDebugInfo>
<BCC_SourceDebuggingOn>true</BCC_SourceDebuggingOn>
<BCC_DebugLineNumbers>true</BCC_DebugLineNumbers>
- <VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=2.5.2.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
+ <VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=2.5.3.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<VerInfo_Locale>1033</VerInfo_Locale>
</PropertyGroup>
<ItemGroup>
@@ -318,7 +318,7 @@
<CfgParent>Base</CfgParent>
</BuildConfiguration>
</ItemGroup>
- <Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
+ <Import Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')" Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
@@ -372,5 +372,5 @@
</BorlandProject>
<ProjectFileVersion>12</ProjectFileVersion>
</ProjectExtensions>
- <Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
+ <Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
</Project>
View
Binary file not shown.
@@ -1,7 +1,7 @@
[Version]
Count=2
CurrentProductionProgramVersion=2.4.3
-CurrentBetaProgramVersion=2.5.2
+CurrentBetaProgramVersion=2.5.3
[Program Version 0]
ProgramLocationPath=http://pyscripter.googlecode.com/files/
@@ -34,8 +34,8 @@ Item17=- 511, 512, 515, 525, 526, 527, 528, 532, 559, 560
[Program Version 1]
ProgramLocationPath=http://pyscripter.googlecode.com/files/
-ProgramLocationFileName=PyScripter-v2.5.2-x64-Setup.exe
-ProgramVersion=2.5.2
+ProgramLocationFileName=PyScripter-v2.5.3-x64-Setup.exe
+ProgramVersion=2.5.3
ProgramReleaseType=prtBeta
ProgramSize=5000000
ProgramReleaseDate=19/03/2012
@@ -1,7 +1,7 @@
[Version]
Count=2
CurrentProductionProgramVersion=2.4.3
-CurrentBetaProgramVersion=2.5.2
+CurrentBetaProgramVersion=2.5.3
[Program Version 0]
ProgramLocationPath=http://pyscripter.googlecode.com/files/
@@ -34,8 +34,8 @@ Item17=- 511, 512, 515, 525, 526, 527, 528, 532, 559, 560
[Program Version 1]
ProgramLocationPath=http://pyscripter.googlecode.com/files/
-ProgramLocationFileName=PyScripter-v2.5.2-Setup.exe
-ProgramVersion=2.5.2
+ProgramLocationFileName=PyScripter-v2.5.3-Setup.exe
+ProgramVersion=2.5.3
ProgramReleaseType=prtBeta
ProgramSize=5000000
ProgramReleaseDate=21/03/2012
View
@@ -806,6 +806,8 @@ procedure TSynPythonSyn.NumberProc;
end else if temp = DOT then begin
Result := HandleDot;
// Error!
+ end else if CharInSet(temp, LONGINDICATOR) then begin
+ Result := False;
end else if IsIdentChar(temp) then begin
Result := HandleBadNumber;
// End of number
View
@@ -452,7 +452,7 @@ procedure TGrepSearchRunner.GrepDirectories(const Dir: string; const Mask: strin
Async := TAsyncCalls.Invoke(procedure begin
WalkThroughDirectories(Dir, Mask, PreCallBack, FGrepSettings.IncludeSubdirs);
end);
- TAsyncCalls.MsgExec(Async, Application.ProcessMessages);
+ //TAsyncCalls.MsgExec(Async, Application.ProcessMessages);
end;
procedure TGrepSearchRunner.Execute;
View
@@ -94,6 +94,7 @@ TBaseFrameInfo = class(TObject)
TBaseNameSpaceItem = class(TObject)
// Base (abstract) class for Namespace item information
protected
+ fPyObject : Variant;
GotChildNodes : Boolean;
GotBufferedValue : Boolean;
BufferedValue : string;
@@ -122,6 +123,7 @@ TBaseNameSpaceItem = class(TObject)
property ChildCount : integer read GetChildCount;
property ChildNode[Index : integer] : TBaseNameSpaceItem
read GetChildNode;
+ property PyObject : Variant read fPyObject;
end;
TPyBaseInterpreter = class(TObject)
View
@@ -42,7 +42,6 @@ TPyObjectInfo = record
TNameSpaceItem = class(TBaseNameSpaceItem)
// Implementation of the Base class for the internal debugger
protected
- fPyObject : Variant;
fChildCount : integer;
fChildNodes : TStringList;
fName : string;
View
@@ -1068,37 +1068,56 @@ procedure TModuleProxy.Expand;
i : integer;
S : string;
VariableProxy : TVariableProxy;
+ NS, ChildNS : TBaseNameSpaceItem;
begin
if Name = '__main__' then begin
if Assigned(fChildren) then fChildren.Clear;
- if Assigned(fGlobals) then fGlobals.Clear;
- end else if fIsExpanded then
- Exit;
-
- InspectModule := Import('inspect');
- ItemsDict := fPyModule.__dict__;
- ItemKeys := ItemsDict.keys();
- if GetPythonEngine.IsPython3000 then
- ItemKeys := BuiltinModule.list(ItemKeys);
- ItemKeys.sort();
- for i := 0 to len(ItemKeys) - 1 do begin
+ fGlobals.Clear;
+ NS := PyControl.ActiveDebugger.Evaluate('__import__("__main__")');
try
- S := ItemKeys.__getitem__(i);
- ItemValue := ItemsDict.__getitem__(S);
- if InspectModule.isroutine(ItemValue) then
- AddChild(TFunctionProxy.CreateFromFunction(S, ItemValue))
- else if InspectModule.isclass(ItemValue) then
- AddChild(TClassProxy.CreateFromClass(S, ItemValue))
- // the following would risk infinite recursion and fails in e.g. os.path
- // path is a variable pointing to the module ntpath
- // else if InspectModule.ismodule(ItemValue) then
- // AddChild(TModuleProxy.CreateFromModule(ItemValue))
- else begin
- VariableProxy := TVariableProxy.CreateFromPyObject(S, ItemValue);
- VariableProxy.Parent := self;
- Globals.Add(VariableProxy);
+ for I := 0 to NS.ChildCount do begin
+ ChildNS := NS.ChildNode[i];
+ if ChildNS.IsFunction or ChildNS.IsMethod then
+ AddChild(TFunctionProxy.CreateFromFunction(ChildNS.Name, ChildNS.PyObject))
+ else if ChildNS.IsClass then
+ AddChild(TClassProxy.CreateFromClass(ChildNS.Name, ChildNS.PyObject))
+ else begin
+ VariableProxy := TVariableProxy.CreateFromPyObject(ChildNS.Name, ChildNS.PyObject);
+ VariableProxy.Parent := self;
+ Globals.Add(VariableProxy);
+ end;
+ end;
+ finally
+ NS.Free;
+ end;
+ end else if fIsExpanded then
+ Exit
+ else begin
+ InspectModule := Import('inspect');
+ ItemsDict := fPyModule.__dict__;
+ ItemKeys := ItemsDict.keys();
+ if GetPythonEngine.IsPython3000 then
+ ItemKeys := BuiltinModule.list(ItemKeys);
+ ItemKeys.sort();
+ for i := 0 to len(ItemKeys) - 1 do begin
+ try
+ S := ItemKeys.__getitem__(i);
+ ItemValue := ItemsDict.__getitem__(S);
+ if InspectModule.isroutine(ItemValue) then
+ AddChild(TFunctionProxy.CreateFromFunction(S, ItemValue))
+ else if InspectModule.isclass(ItemValue) then
+ AddChild(TClassProxy.CreateFromClass(S, ItemValue))
+ // the following would risk infinite recursion and fails in e.g. os.path
+ // path is a variable pointing to the module ntpath
+ // else if InspectModule.ismodule(ItemValue) then
+ // AddChild(TModuleProxy.CreateFromModule(ItemValue))
+ else begin
+ VariableProxy := TVariableProxy.CreateFromPyObject(S, ItemValue);
+ VariableProxy.Parent := self;
+ Globals.Add(VariableProxy);
+ end;
+ except
end;
- except
end;
end;
fIsExpanded := True;
View
@@ -75,7 +75,7 @@ TUnitTestWizard = class(TPyIDEDlgBase)
implementation
-uses dmCommands, JvJVCLUtils, SpTBXSkins;
+uses dmCommands, JvJVCLUtils, SpTBXSkins, uCommonFunctions;
{$R *.dfm}
@@ -202,7 +202,7 @@ class function TUnitTestWizard.GenerateTests(ModuleFileName,
Application.ProcessMessages;
WaitCursorInterface := WaitCursor;
// Generate code
- Result := Format(Header, [ChangeFileExt(ExtractFileName(ModuleFileName), '')]);
+ Result := Format(Header, [FileNameToModuleName(ModuleFileName)]);
Node := (ExplorerTree.RootNode)^.FirstChild^.FirstChild;
while Assigned(Node) do begin
Data := PNodeDataRec(ExplorerTree.GetNodeData(Node));
View
@@ -169,7 +169,7 @@ inherited ToDoWindow: TToDoWindow
Left = 24
Top = 56
Bitmap = {
- 494C010104000900340010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
+ 494C0101040009003C0010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
0000000000003600000028000000400000002000000001002000000000000020
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
View
@@ -251,6 +251,7 @@ function TToDoWindow.GetPreCallback: TDirectoryWalkProc;
Name := Path + FileInfo.Name;
TAsyncCalls.VCLSync(procedure begin
LoadFile(Name);
+ Application.ProcessMessages;
end);
end;
end;
@@ -750,13 +751,11 @@ procedure TToDoWindow.LoadFile(const FileName: string);
end;
procedure TToDoWindow.RefreshTodoList;
-var
- Cursor: IInterface;
begin
- Application.ProcessMessages; // to repaint etc.
- Cursor := WaitCursor;
FAbortSignalled := False;
actFileAbort.Enabled := True;
+ actFileRefresh.Enabled := False;
+ Application.ProcessMessages; // to repaint etc.
try
ClearDataListAndListView;
@@ -783,6 +782,7 @@ procedure TToDoWindow.RefreshTodoList;
else
actEditGoto.Enabled := False;
fAbortSignalled := True;
+ actFileRefresh.Enabled := True;
actFileAbort.Enabled := False;
end;
end;
@@ -802,7 +802,7 @@ procedure TToDoWindow.EnumerateFilesByDirectory;
CommandsDataModule.PyIDEOptions.PythonFileExtensions, PreCallBack,
ToDoExpert.FRecurseDirScan);
end);
- TAsyncCalls.MsgExec(Async, Application.ProcessMessages);
+ //TAsyncCalls.MsgExec(Async, Application.ProcessMessages);
end;
procedure TToDoWindow.EnumerateOpenFiles;
View
@@ -165,9 +165,9 @@ procedure TUnitTestWindow.actRefreshExecute(Sender: TObject);
// a TestCase class in the module!!!
TestCount := 0;
for i := 0 to Len(TestSuite._tests) - 1 do begin
- InnerTestSuite := TestSuite._tests[i];
+ InnerTestSuite := TestSuite._tests.__getitem__(i);
for j := 0 to Len(InnerTestSuite._tests) - 1 do begin
- TestCase := InnerTestSuite._tests[j];
+ TestCase := InnerTestSuite._tests.__getitem__(j);
// set the TestStatus
TestCase.testStatus := Ord(tsNotRun);
TestCase.errMsg := string('');

0 comments on commit 7b57805

Please sign in to comment.